How Can Euler-Bernoulli's Equation Be Solved Numerically Using C++?

  • Context: Graduate 
  • Thread starter Thread starter pgioun
  • Start date Start date
  • Tags Tags
    Differential
Click For Summary
SUMMARY

The discussion focuses on solving the Euler-Bernoulli equation numerically using C++. The equation is expressed as EI y^{4}(x)=f(x) with specific boundary conditions for a cantilever beam. To convert this fourth-order ordinary differential equation (ODE) into a system of first-order ODEs, new variables representing the derivatives are defined. The shooting method is suggested as a numerical approach to solve this system, emphasizing the rearrangement of initial conditions to fit the new variable definitions.

PREREQUISITES
  • Understanding of Euler-Bernoulli beam theory
  • Familiarity with numerical methods for ODEs
  • Proficiency in C++ programming
  • Knowledge of the shooting method for boundary value problems
NEXT STEPS
  • Research how to implement the shooting method in C++
  • Learn about numerical integration techniques for ODEs, such as Runge-Kutta methods
  • Study the transformation of higher-order ODEs into first-order systems
  • Explore libraries in C++ for solving differential equations, such as Boost or Eigen
USEFUL FOR

Engineers, applied mathematicians, and software developers interested in numerical methods for solving differential equations, particularly in structural analysis and beam theory applications.

pgioun
Messages
5
Reaction score
0
Hi,
I want to solve the Euler-Bernoulli eq numerically using a c++ library.

EI [itex]y^{4}[/itex](x)=f(x), y(0)=0,y'(0)=0,y(L)=0,y'(L)=0.

where L is the length of the beam and the initial conditions are for a cantilever.

In order to achieve that I have to make it a set of 1st ode.
How this system of 1st order ode would be like and how the initial conditions
should be rearranged?

How should the shooting method be applied to this system of 4 odes problem?

Thanks
 
Last edited:
Physics news on Phys.org
To turn a higher order ODE into a system of first order ODEs you just define new variables which are equal to derivatives of the variable you want to solve for.

Here's an example with a second order ODE:

$$y''(x) + y'(x) - y (x) = f(x)$$

To make this a system of first order ODEs, define ##u(x)= y'(x)##. Then, it immediately follows that ##u'(x) = y''(x) = -y'(x) + y(x) = -u(x) + y(x)##. The system of equations is thus

$$\begin{eqnarray*}
y'(x) & = & u(x) \\
u'(x) & = & -u(x) + y(x)
\end{eqnarray*}$$

This is generally how you want your system of ODEs to look: ##v_i'(x) = f_i(x,v_1(x),v_2(x),\dots,v_i(x),\dots,v_n(x))##. In the example above, n = 2 and ##v_1 = y,~v_2 = u##. In your case, n = 4.

If this problem had initial conditions ##y(0) = 0,~y'(0)=1##, this would correspond to ##y(0)=0,u(0)=1##.

Now try it with your ODE.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 7 ·
Replies
7
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 52 ·
2
Replies
52
Views
9K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K