application of variational methods and galerkin … · methods based on matlab. solutions for field...

6
Proceedings of IRF International Conference, 28 th February 2016, Goa, India, ISBN: 978-93-85973-54-3 36 APPLICATION OF VARIATIONAL METHODS AND GALERKIN METHOD IN SOLVING ENGINEERING PROBLEMS REPRESENTED BY ORDINARY DIFFERENTIAL EQUATIONS 1 B.V. SIVA PRASAD REDDY, 2 K. RAJESH BABU 1,2 Department of Mechanical Engineering, Sri Venkateswara University college of Engineering, Tirupati, India E-mail: 1 [email protected], 2 [email protected]; Abstract – Nowadays the accuracy of problem solving is very important. In olden days the Variational methods were used to solve all engineering problems like structural, heat transfer and fluid mechanics problems. With the emergence of Finite Element Method (FEM) those methods are become less important, although FEM is also an approximate method of numerical technique. The concept of variational methods is inducted to solve majority of engineering problems, which gives more accurate results than any other type of approximate methods. The engineering problems like uniform bar, beams, heat transfer and fluid flow problems are used in our daily life and they play an important role in the development of our society. To achieve drastic development in the society, it is a must to focus on adopting approximation methods that improve the accuracy of engineering solution. Of all the methods, Galerkin method is emerging as an alternative and more accurate method than those of Ritz, Rayleigh – Ritz methods. Any physical problem in nature can be transformed into an equivalent mathematical model by idealization process and describing its behavior by a suitable governing equation with associated boundary conditions. Against this backdrop, the present work focuses on application of different variational methods in solving ordinary differential equations. The reason behind choosing second order differential equation (ODE) is that most of the structural and heat transfer problems can well be represented by an ODE. As an illustration the work herein reported highlights the utility of above cited methods with a simple bar problem. Furthermore the numerical part of this work is carried out on a MATLAB platform. Keywords— Variational methods, Second order differential equation, elastic bar, Ritz method, Rayleigh – Ritz method, Galerkin method and MATLAB I. INTRODUCTION The objective of this research is to evaluate and examine the variational methods like Ritz, Rayleigh – Ritz and weighted residual methods like Galerkin methods based on MATLAB. Solutions for field problems are widely used mathematical tools in engineering analysis. These methods are applied in such areas as the analysis of solids and structures, heat transfer, fluids and almost any other areas of engineering analysis. The variational methods are introduced to solve the Engineering problems around 1820. The variational method was first used by Lord Rayleigh in 1870. However, the approach did not receive much recognition by the scientific community. Nearly 40 years later, due to the publication of two papers by Ritz, the method came to be called the Ritz method. To recognize the contributions of both men, the theory was later renamed the Rayleigh – Ritz method. The Ritz method proposed by the Swiss mathematician Walther Ritz in between 1878 to 1909. After that the Galerkin method is proposed by Russion mathematician “Boris Galerkin” in 1915. The Galerkin method is one of best method of weighted residual method. In the Galerkin method, it only requires that the residual of the differential equation be orthogonal to each term of the series that satisfy the boundary conditions. These methods are discussed in much research paper to apply on different engineering problems. The J. N. Reddy [1] was applied on his book to solve bar, beam problems. The Robert D. Cook and David S. Malkus [2] are introduced variational methods on engineering problems. J. N. Reddy [1], The Robert D. Cook and David S. Malkus [2], S. S. Rao [3], O.C Zienkiewicz, R.L. Taylor & J. Z. Zhu [4] are used these principles to Finite Element Method in engineering applications. Recently the Sanjay Govindjee [5] introduced the variational methods solving with the MATLAB software. Any physical problem in nature can be transformed into an equivalent mathematical model by idealization process and describing its behavior by a suitable governing equation with associated boundary conditions. Some real engineering problems are shown in the following figures. Fig 1 Beam having transverse load Fig 2 A cantilever beam clamped at one end In the present study we have chosen a simple second order differential equation, whose solution is sought by different variational methods which include Ritz, Rayleigh – Ritz and Galerkin method. All of these

Upload: others

Post on 22-Mar-2020

6 views

Category:

Documents


1 download

TRANSCRIPT

Proceedings of IRF International Conference, 28th February 2016, Goa, India, ISBN: 978-93-85973-54-3

36

APPLICATION OF VARIATIONAL METHODS AND GALERKIN METHOD IN SOLVING ENGINEERING PROBLEMS REPRESENTED

BY ORDINARY DIFFERENTIAL EQUATIONS

1B.V. SIVA PRASAD REDDY, 2K. RAJESH BABU

1,2Department of Mechanical Engineering, Sri Venkateswara University college of Engineering, Tirupati, India

E-mail: [email protected], [email protected]; Abstract – Nowadays the accuracy of problem solving is very important. In olden days the Variational methods were used to solve all engineering problems like structural, heat transfer and fluid mechanics problems. With the emergence of Finite Element Method (FEM) those methods are become less important, although FEM is also an approximate method of numerical technique. The concept of variational methods is inducted to solve majority of engineering problems, which gives more accurate results than any other type of approximate methods. The engineering problems like uniform bar, beams, heat transfer and fluid flow problems are used in our daily life and they play an important role in the development of our society. To achieve drastic development in the society, it is a must to focus on adopting approximation methods that improve the accuracy of engineering solution. Of all the methods, Galerkin method is emerging as an alternative and more accurate method than those of Ritz, Rayleigh – Ritz methods. Any physical problem in nature can be transformed into an equivalent mathematical model by idealization process and describing its behavior by a suitable governing equation with associated boundary conditions. Against this backdrop, the present work focuses on application of different variational methods in solving ordinary differential equations. The reason behind choosing second order differential equation (ODE) is that most of the structural and heat transfer problems can well be represented by an ODE. As an illustration the work herein reported highlights the utility of above cited methods with a simple bar problem. Furthermore the numerical part of this work is carried out on a MATLAB platform. Keywords— Variational methods, Second order differential equation, elastic bar, Ritz method, Rayleigh – Ritz method, Galerkin method and MATLAB I. INTRODUCTION The objective of this research is to evaluate and examine the variational methods like Ritz, Rayleigh – Ritz and weighted residual methods like Galerkin methods based on MATLAB. Solutions for field problems are widely used mathematical tools in engineering analysis. These methods are applied in such areas as the analysis of solids and structures, heat transfer, fluids and almost any other areas of engineering analysis. The variational methods are introduced to solve the Engineering problems around 1820. The variational method was first used by Lord Rayleigh in 1870. However, the approach did not receive much recognition by the scientific community. Nearly 40 years later, due to the publication of two papers by Ritz, the method came to be called the Ritz method. To recognize the contributions of both men, the theory was later renamed the Rayleigh – Ritz method. The Ritz method proposed by the Swiss mathematician Walther Ritz in between 1878 to 1909. After that the Galerkin method is proposed by Russion mathematician “Boris Galerkin” in 1915. The Galerkin method is one of best method of weighted residual method. In the Galerkin method, it only requires that the residual of the differential equation be orthogonal to each term of the series that satisfy the boundary conditions. These methods are discussed in much research paper to apply on different engineering problems. The J. N. Reddy [1] was applied on his book to solve bar, beam

problems. The Robert D. Cook and David S. Malkus [2] are introduced variational methods on engineering problems. J. N. Reddy [1], The Robert D. Cook and David S. Malkus [2], S. S. Rao [3], O.C Zienkiewicz, R.L. Taylor & J. Z. Zhu [4] are used these principles to Finite Element Method in engineering applications. Recently the Sanjay Govindjee [5] introduced the variational methods solving with the MATLAB software. Any physical problem in nature can be transformed into an equivalent mathematical model by idealization process and describing its behavior by a suitable governing equation with associated boundary conditions. Some real engineering problems are shown in the following figures.

Fig 1 Beam having transverse load

Fig 2 A cantilever beam clamped at one end

In the present study we have chosen a simple second order differential equation, whose solution is sought by different variational methods which include Ritz, Rayleigh – Ritz and Galerkin method. All of these

Application of Variational Methods and Galerkin Method in Solving Engineering Problems Represented by Ordinary Differential Equations

Proceedings of IRF International Conference, 28th February 2016, Goa, India, ISBN: 978-93-85973-54-3

37

methods seek an approximate solution in the form of a linear combination of suitable approximate function, preferably power series. The parameters or coefficients are determined such that the approximate solution satisfies weak or variational form or minimizes the quadratic functional of the equation (as in Rayleigh – Ritz method) under study. Various methods differ from each other in the choice of the approximate functions. In addition an elastic bar subjected to uniformly distributed load is also analyzed and solved for displacement field by Galerkin method. The approximate solution so obtained is validated by a suitable numerical data. The following sections will briefly highlight the various variational methods to be adopted in solving the selected governing equation and an elastic bar problem. II. CHOSEN SECOND ORDER GOVERNING EQUATIONS The following governing equation is selected for its analysis by different variational methods like Ritz, Rayleigh – Ritz method and Galerkin methods.

A. − − 푢 + 푥 = 0 For 0 < x < 1 SET: 1 Boundary conditions u (0) = 0, u (1) = 0 SET: 2 Boundary conditions 푢(0) = 0, = 1 Exact solution of second order ODE for set:1 boundary condition

푢(푥) =2 sin(1 − x) + sinx

sin1 + (푥 − 2) Exact solution of second order ODE for set:2 boundary condition

푢(푥) =2 cos(1− x)− sinx

cos1 + (푥 − 2) The following governing equation is

selected for its analysis by Galerkin method involving two different approaches that include formulation by variational method and weighted residual method. This equation also governs an elastic bar element subject to uniformly distributed load and end load as well.

Fig 3 Uniform elastic bar, loaded by axial tip force The above physical modal is converted into mathematical governing equation as bellow

B. + = 0 For 0 < x < L

Boundary conditions are u (0) = 0, = Exact solution of 1-D elastic bar

푢(푥) =3퐶퐿 푥 − 퐶푥 + 6푏퐴퐸푥

6퐴퐸

III. ANALYSIS OF 2nd ORDER ODE BY APPROXIMATE METHODS The given second order ODE has been analyzed by adopting Ritz method, Rayleigh – Ritz method and Galerkin method for one and two – parameter approximation. The corresponding results were tabulated and illustrated as detailed below. And also the comparisons of those results with exact results were shown below. 3.1 Solution by Ritz Method Governing equation − − 푢 + 푥 = 0 For 0 < x < 1

Boundary conditions u (0) = 0, u (1) = 0 The given governing equation is in strong form. In Ritz method first of all strong form is converted into weak form. Then the governing equation written as ∫ 푤 ∗ [− − 푢 + 푥 ]푑푥 = 0

−푤 ∗ + ∫ ∗ 푑푥 − ∫ 푤 ∗ 푢푑푥 +

∫ 푤 ∗ 푥 푑푥 = 0 The above weak form can be expressed as leaner and bilinear forms 퐵 (푤, 푢) = 퐿 (푤). Bilinear form of above equation B (w, u) = ∫ ∗ 푑푥 −

∫ 푤 ∗ 푢푑푥 and linear form is L (w)

=−∫ 푥 푤 푑푥 + 푤 ∗ To get solution in Ritz method select approximate equation with satisfy above boundary conditions conditions ɸ = 푥 (1− 푥) , which is the simplest function satisfying the boundary conditions

푈 = C 푥(1 − 푥) + C 푥 (1− 푥)+ … … … . +C 푥 (1− 푥)

By substituting approximate function 퐵(w, u) becomes

퐵 ɸ , ɸ =푑ɸi푑푥 ∗

푑푑푥 ( C ɸ )푑푥

− ɸ ( C ɸ )푑푥

= ∑ C ∫ ɸ ∗ɸ− ɸ ∗ ɸ 푑푥 this is also

called stiffness matrix D and linear term 퐿 ɸ = −∫ ɸ 푥 푑푥 this is a force matrix F . The algebraic equations can be expressed in matrix from [D]C = F by solving this the coefficients of approximate function (퐶 ,퐶 ,…….,퐶 ) are obtained..

A, E q = Cx

P L

Application of Variational Methods and Galerkin Method in Solving Engineering Problems Represented by Ordinary Differential Equations

Proceedings of IRF International Conference, 28th February 2016, Goa, India, ISBN: 978-93-85973-54-3

38

Table 1 Ritz coefficients values for one and two parameter approximation

These coefficients are finally submitted in approximate function, one can get the desired approximate solution

Table 2 Ritz field variable’ u’ at various points for

one and two parameter approximation

Graphical reprasentation of the above results

Fig 4 Comparison of Ritz results with exact method for set1 boundary conditions

3.2 Solution by Rayleigh – Ritz method

In the Rayleigh – Ritz method, functional is constructed and is minimized to obtain unknown coefficients of an approximate function. Let us assume the following second order ODE

− − 푢 + 푥 = 0 For 0 < x < 1

Boundary conditions 푢(0) = 0, =1

The functional in Rayleigh – Ritz method is 퐼(푢) = 퐵(푢, 푢) + 퐿(푢) , The given governing equation is in strong form. In Rayleigh – Ritz method first of all strong form is converted into weak form

−푤 ∗ + ∫ ∗ 푑푥 − ∫ 푤 ∗ 푢푑푥 +

∫ 푤 ∗ 푥 푑푥 = 0 The above weak form can be expressed as leaner and bilinear forms B (w, u) = ∫ ∗ 푑푥 − ∫ 푤 ∗ 푢푑푥

L(w) = −∫ 푥 푤 푑푥 + [푤] ∗ 1 The functional is 퐼(푢) = 퐵(푢,푢) + 퐿(푢) 퐼(푢) = ∫ − 푢 − 2푢푥 푑푥 + 푢(1) To get solution in Rayleigh – Ritz method, select an approximate function which will satisfy above boundary conditionsɸ = 푥 , which is the simplest function satisfying the boundary conditions.

푈 = C 푥 + C 푥 + … … … . +C 푥 Substituting 푈 in functional

The necessary condition for the minimizing of

functional “I” is that Apply ( )

= 0 ,

=

∫ 2 ɸ ∑ 퐶ɸ − 2ɸ ∑ 퐶 ɸ −

2푥 ɸ 푑푥 + (1) = 0 From above equation the bi – linear and linear terms are separated as 푏 = ∫ ɸ ∗

ɸ− ɸ ∗ ɸ 푑푥

and 퐹 = −∫ ɸ 푥 푑푥 + (1).The algebraic equations can be expressed in matrix from [B]C = F by solving this the coefficients of approximate function (퐶 ,퐶 ,…….,퐶 ) are obtained..

Table 3 R – R coefficients values for N=1and N=2

Table 4 Comparison of Rayleigh – Ritz results with exact method for set two boundary conditions

Application of Variational Methods and Galerkin Method in Solving Engineering Problems Represented by Ordinary Differential Equations

Proceedings of IRF International Conference, 28th February 2016, Goa, India, ISBN: 978-93-85973-54-3

39

Graphical reprasentation of the above results

Fig 5 Comparison of Rayleigh – Ritz results with exact method for set 2 boundary conditions

3.3 Solution by Galerkin method Let us assume the following second order ODE, for high lighting the Galerkin method. − − 푢 + 푥 = 0 For 0 < x < 1 Boundary conditions u (0) = 0, u (1) = 0

In Galerkin method the weighting function treated as same as trivial functions (or) shape functions themselves.

퐺 = 푊푅(푥)

Ω푑푥 = 0

Residue is given as R = − − 푢 + 푥 ≠ 0 Where 푊 = 푁 so 퐺 = ∫ 푁 ∗ 푅(푥)

Ω 푑푥 = 0 for 푖 = 1, 2, 3 … … . . , 푛

퐺 = 푁 ∗ −푑 푢푑푥 − 푢 + 푥 푑푥 = 0

The given governing equation is converted into residual form. In Galerkin method next step is to alter the form by applying integration by parts

퐺 = −푁 ∗ + ∫ ∗ 푑푥 − ∫ 푁 ∗ 푢푑푥 +

∫ 푁 ∗ 푥 푑푥 = 0 To get solution in Galerkin method, select an approximate function which will satisfy boundary conditions. Functions 푥 (1− 푥) , which is the simplest function satisfying the boundary conditions. For one – parameter approximate function 푢(푥) =퐶 푥(1− 푥) Weight function is same as shape function in Galerkin method 푁 = 푥(1 − 푥). For two – parameter approximate function 푢(푥) =퐶 푥 (1− 푥), = 2퐶 푥 − 3퐶 푥 Weight function is same as shape function in Galerkin method 푁 =푥 (1 − 푥) and = (2푥 − 3푥 ) , the algebraic equations can be solved for the coefficients of approximate function (퐶 ,퐶 ,…….,퐶 )

Table 5 Galerkin coefficients values for one and two

parameter approximation

Table 6 Comparison of Galerkin results with exact method for set1 boundary conditions

Graphical reprasentation of the above results.

Fig 6 Comparison of Galerkin results with exact method for set1 boundary conditions

IV. ANALYSIS OF AN ELASTIC BAR BY APPROXIMATION METHODS The given elastic bar has been analyzed by adopting Galerkin method wherein two different approaches – weak formulation approach and weighted residual method approach have been used.

Fig 7 Uniform elastic bar

The governing differential equation for the above bar is

+ = 0 For 0 < x < L,

Boundary conditions are u (0) = 0, = Numerical data E = 200 GPa, A =600 mm2, f = 5000 N/m, L = 600mm and P = 200 KN And f A = C x , 퐶 = , 퐶 = ∗ , 푏 = = 4.1 Solution by Galerkin method – Approach 1 In Galerkin method the weighting function treated as same as trivial functions (or) shape functions themselves. 퐺 = ∫ 푊푅(푥)

Ω 푑푥 = 0Where 푊 = 푁 so퐺 = ∫ 푁 ∗ 푅(푥)

Ω 푑푥 = 0 for 푖 = 1, 2, 3 … … . . , 푛

A, E q = Cx

P L

Application of Variational Methods and Galerkin Method in Solving Engineering Problems Represented by Ordinary Differential Equations

Proceedings of IRF International Conference, 28th February 2016, Goa, India, ISBN: 978-93-85973-54-3

40

Residue is given as R= + ≠ 0

퐺 = ∫ 푁 + Ω 푑푥 = 0

The given governing equation is converted into residual form. In Galerkin method next step is to alter the form by applying integration by parts 퐺 = ∫ 푁 푑푥 + ∫ 푁 푑푥 = 0 Doing integration by parts the above equation is converted into

퐺 = 푁 ∗푑푢푑푥 −

푑푤푑푥

푑푢푑푥 푑푥 + 푁

Cx퐴퐸 푑푥 = 0

Choosing approximate function 푥 is satisfy the boundary conditions. Approximate function U(x) = 푐 푥 + 푐 푥 + 푐 푥 + ⋯ For one – parameter approximate function u(x) = 퐶 푥 and trail function 푁 = 푥 . By Substitute approximate function in 퐺 equation we get the coefficient 퐶 = + . For two – parameter approximate function approximate function u(x) = 푐 푥 + 푐 푥 and trail function 푁 = 푥 and 푁 = 푥 by Substitute approximate function in 퐺 equation we get the coefficients 퐶 = + , 퐶 = −

Table 7 Galerkin Coefficients values for one and two

parameter approximation with approach 1

Table 8 Comparison of Galerkin – Approach 1 results with exact results

Graphal reprasentation of the above results

Fig: 8 Comparison of Galerkin – Approach 1 results with exact results

4.2 Solution by Galerkin method – Approach 2 In Galerkin method the weighting function treated as same as trivial functions (or) shape functions themselves.

Table 9 Galerkin coefficients values for one and two parameter approximation with approach 2

Table 10 Comparison of Galerkin – Approach 2 results with exact results

Application of Variational Methods and Galerkin Method in Solving Engineering Problems Represented by Ordinary Differential Equations

Proceedings of IRF International Conference, 28th February 2016, Goa, India, ISBN: 978-93-85973-54-3

41

Graphal reprasentation of the above results

Fig 9 Comparison of Galerkin – Approach 2 results with exact results

V. RESULTS AND DISCUSSION The chosen second order ordinary differential equation (ODE) has bean solved by Ritz method, Rayleigh – Ritz method and Galerkin method. The approximate function selected was a power series function. The solution has bean obtained for different numbers of coefficients, which include N=1 and N=2. The corresponding coefficients were determined and the associated plots were drawn. Besides, Ritz method, Rayleigh – Ritz method and Galerkin method were also employed in solving the given ordinary differential equation (ODE). The corresponding results and the associated plots were also depicted in Table 1 to 6 and Fig 4 to 6 respectively. Similarly, the results of the one dimensional elastic bar for Galerkin method with two different approaches were employed. The corresponding results and the associated plots were also depicted in Table 7 to10 and Fig 8 to 9 respectively. CONCLUSIONS In this work, an attempt has been made to solve the given ODE by different variational methods. It has also been found that the results as obtained by Ritz, Rayleigh – Ritz and Galerkin method were almost in agreement with each other. Further the approximate solutions were obtained by assuming their different approximate functions (power series functions) that would satisfy their different set of boundary conditions associated with the given ODE. The

coefficients of power series function have been determined for one – parameter approximate and two – parameter approximate functions. The resultant plots were drawn to illustrate the variation of dependent variable, u (x) with respect to the independent variable, x. It has been observed that there exists a linear relationship between x and u (x) when dealing with set 2 boundary conditions. In addition one – dimensional analysis of an elastic bar has been carried out by Galerkin method of Weighted Residual Methods. Two approaches of Galerkin method have been utilized in solving a One dimensional (1D) elastic bar problem. The solution by Weighted Residual Method (WRM) has been compared with that of exact one and it was found that approximate solution was same as that of exact one. It was further noted that displacement function u (x) varies linearly along the length of an elastic bar. This relationship is in concurrent with the established fact that the Hooke’s law holds good in the static analysis of a linear structure. The suitable numerical data have been substituted in the relevant equations and the results were validated. The numerical part of the thesis has been carried out on MATLAB platform. REFERENCES

[1] J.N. Reddy, An Introduction to the Finite Element Method, reprinted in India, 2006, Tata McGraw – Hill.

[2] Robert D. Cook, David S. Malkus, Michael E. Plesha, Robert J. Witt, Concepts And Applications Of Finite Element Analysis, reprinted in Delhi,2009, Wiley India(p) Ltd

[3] S. S. Rao, Finite Element Method in Engineering, reprinted in India, 2001, Butterworth – Heinemann

[4] O.C Zienkiewicz, R.L. Taylor & J.Z.Zhu, The Finite Element Method Its Basis & Fundamentals in Engineering, re printed 2014,University of California, Berkeley

[5] Sanjay Govindjee, A First Course on Variational Methods in Structural Mechanics and Engineering, Department of Civil and Environmental Engineering University of California, Berkeley, 2014,CA 94720-1710

[6] Mark S. Gockenbach, MATLAB Tutorial to accompany Partial Differential Equations, Analytical and Numerical (SIAM, 2010)

[7] Abraham Asfaw, Solving Differential Equations Using MATLAB November 28, 2011