# Convolution as seen in Virtual Work Nov 2023

Convolution as seen in a Virtual Work (Structural Analysis) Problem
Linear or nonlinear?

Recently, I read a post featuring an example virtual work problem in structural analysis.

On the first page, there was the usual integration equation in which the strain energy of a virtual moment was multiplied by the strain energy of a single point load. Nothing unusual at all about the problem, or the approach, or the equation.

My surprise was in seeing the shortcut calculation. The diagram is at the bottom of Page 1 (the diagram with two triangles). The integration equation and the shortcut are near the top of Page 2 (the third equation). Here’s the link to the PDF.

Indeed the shortcut is somewhat explained in the linked PDF below. Refer to Page 10.

I had never seen the shortcut used, nor the table which explained it.

I decided to explore this on my own.

My exploration resulted in a few charts as follows. All of these are live interactive (built using Plotly).

Hover over chart elements (on a mobile device, touch) to see data values.

I used Python, Sympy, and Jupyter to program my solutions.

My first objective was to verify the coefficient, , used in the equation on Page 2 (*).

After working that out, I proceeded to the general case of the convolution of two triangles as follows

• Triangle 1:
• left side at: x = 0
• right side at: x = 1
• apex at:  x = a
• Triangle 2:
• left side at: x = 0
• right side at: x = 1
• apex at: x = b
There are 3 parts to the integration, labeled , , amd . I add , , and to obtain , the result of the integration.

```# In this example, a <= b
x, a, b  = symbols('x, a, b')
Q = integrate((x/a)*(x/b), (x, 0, a))
R = integrate((1-x)/(1-a)*(x/b), (x, a, b))
S = integrate((1-x)/(1-a)*(1-x)/(1-b), (x, b, 1))

T = Q + R + S
T = simplify(T)
```
I obtained the following general equation.

As I say at the top of this post: “Linear or nonlinear?”

I had fully expected all results, for all and to be nonlinear. Turns out, that is generally true with the exception where or .

If , then the general equation reduces to

$\dpi{110}&space;f(0,b)=\cfrac{0^2+b^2-2b}{6b(0-1)}$

and then to

$\dpi{110}&space;f(0,b)=\cfrac{b^2-2b}{-6b}$

then

$\dpi{110}&space;f(0,b)=\cfrac{b-2}{-6}$

then

$\dpi{110}&space;f(0,b)=\cfrac{2-b}{6}$

which is linear!

If , then the general equation reduces to

$\dpi{110}&space;f(0,b)=\cfrac{a^2+1-2}{6(a-1)}$

and then to

$\dpi{110}&space;f(0,b)=\cfrac{a^2-1}{6(a-1)}$

then

$\dpi{110}&space;f(0,b)=\cfrac{a+1}{6}$

which is linear also!

(*) To close the loop, when and , then

$\dpi{110}&space;f(a,b) = f(0,0.5) = \cfrac{1}{4}$

And when and , then

$\dpi{110}&space;f(a,b) = f(0.5,1) = \cfrac{1}{4}$

I derived another special case as shown below. This pattern has two linear elements and the integration is for the pattern squared.

```# In this example, a <= b
x, a, b, c, d, L1, L2  = symbols('x, a, b, c, d, L1, L2')

Q = b + x      * (c-b)/(L1)
R = c + (x-L1) * (d-c)/(L2-L1)

Q2 = integrate(Q**2, (x, 0,  L1))
R2 = integrate(R**2, (x, L1, L2))

T = Q2 + R2
T = simplify(T)
```

$\dpi{110}&space;F_{special\;1}(a,b,c,L_1,L_2)=\cfrac{1}{3}\,[L_1(a^2+ab)+L_2b^2+(L_2-L_1)(bc+c^2)\]$

I note that the most general convolution of two independent linear segments is:

```# In this example, a <= b
x, a, b, c, d, L1, L2  = symbols('x, a, b, c, d, L1, L2')

R1 = a + (x-L1) * (b-a)/(L2-L1)
R2 = c + (x-L1) * (d-c)/(L2-L1)

T = integrate(R1*R2, (x, L1, L2))
T = simplify(T)
```

$\dpi{110}&space;F_{special\;2}(a,b,c,d,L_1,L_2)=\cfrac{1}{6}\,(L_2-L_1)[2(ac+bd)+(ad+bc)\]$

If and , then this equation reduces to

$\dpi{110}&space;F_{special\;2}(a,b,a,b,L_1,L_2)=\cfrac{1}{3}\,(L_2-L_1)[a^2+b^2+ab\]$

or better yet

$\dpi{110}&space;F_{special\;2}(a,b,a,b,L_1,L_2)=\cfrac{1}{3}\,(L_2-L_1)[(a+b)^2-ab\]$