Introduction

The task was designed to introduce C++ programming. It is quite important in solid mechanics to know the various properties of sections. In engineering handbooks, there can often be tables found of the common sections (U-Section, I-Section, H-Section, etc.) But it is useful to have programs that could calculate these values for complex profiles, since they are not present within these books. For that very reason, the task was to use the knowledge of C++ programming to create such a program that would give the Area and Moment of Inertia as results to the user.

In this paper, for the cross-section properties of self-assertively setup struts without closed loops, a broad computational algorithm in accordance with the line chain and tree models is established. For such models, the two C++ programs are set up. The two models cannot be implemented to struts with any cross-section owning sealed loops [1].

The components of the compliance matrix of non-symmetrical laminates are the compliance matrix of symmetrical laminates assessed at mid surface; \({\alpha }_{ij}\), \({\beta }_{ij}\), \({\delta }_{ij}\). At every wall segment’s “neutral” plane situated at the mid plane, the assets are assessed.

On the premise of sensitivity examination, classification and cross-sectional optimization of a lightweight plan of thin-walled beams was offered. The notion of stiffness mass efficiency was presented, and then the impact and contribution of cross- sectional characteristic lengths on the esteem of this ratio was investigated to ponder the impact of light-weight plan on the stiffness of thin-walled beams [2].

Literature Review

The guidance of inadequacies in provisions was well thought-out in one of the former researches, the loading of eccentricity as a hypothetical original curvature of the thin-walled edifices is unescapable. Ayrton and Perry [3] provided an analysis of thin walled constructions for Safe loading founded on assumptions. The Perry's formula applies stringently when the letdown is by bending and no-one else. A theoretical model for the elastic instability of struts having thin-walled exposed segments was recognized by Timoshenko [4]. The torque which is functional on the thin-walled structures comprises of dual parts subsequent from purely torsional and warping stresses in the following theoretical model. Both Baker as well as Roderick prolonged the improvement of the Timoshenko's model in 1948. Timoshenko et al. [5] along with Mikkola [6] did comparable market research as the warping and buckling stability was investigated. The investigation on the permanence for such structure’s advances fame with all-encompassing utilization of thin walled structures. To design against torsional buckling, Chapman along with Buhagiar [7] applied the Young's buckling equation while, the weakening Effect of local buckling on the compressive load was reconnoitered by Loughlan [8]. To probe lateral buckling of thin walled structures through the spline finite member element method Wang deliberated using the shear lag during [9] (see also, [10,11,12]). In addition to that, Pi et al. (1999) Reconnoitered lateral buckling strengths of cold-formed Z-section beams, Local and distortional buckling of the thin-walled short columns was discussed by Kesti and Davies [13].

A comprehensive theoretical treatment of thin-walled structures including closed beams is provided by Vlasov [14]. The delinquent of non-uniform torsion in tapered box beams was given an outcome by Kristek [15] and the conclusion of a force collapsing the cross section was also measured by him. Both, Boswell as well as Zhang [16] established C1 unceasing element t, delivered the Finite beam element formulation which is for the static analysis of thin-walled box beams, comprising of inadequate transverse stiffening. The distortional function which is categorized by a single parameter in order to investigate distortional properties was later projected by both Boswell and Zhang [17]. They were also able to provide experimental outcomes on the very same subject [18]. For the examination of curved bridges, Zhang and Lyons [19, 20] established a multi-cell box finite beam element, and on account of the torsion and distortion, Boswell as well as Li [21] deliberate warping functions. Razaqpur and Li [22, 23] for shear lag properties and distortional deformation analyze multi-cell box beams with the consideration of warping functions. They opted to prolong their scheme to curved thin-walled box beams [24]. Mikkola and Paavola [25] for elastic box beams recommend the finite element technique. A discrete finite element process in which the cross sections are anticipated to comprise of piecewise rectilinear cross sections of distinct shells was presented by Paavola [26]. The warping function consisting of the number of degrees of freedom equivalent to the number of the corner points of the beam cross section was constructed by Prokic [27].

Both mechanical performances and lightweight optimization [28,29,30] have been comprehensively assisting in the study of thin-walled structures. Numerous progressive stratagems have been proposed overtime such as biomimetic structures [31], multi-cell sections [32], and CFRP components [33]. However, in most practical situations simple section shape and low-cost material are conventionally favored, universal lightweight technique of thin-walled structures still need to be engrossed. Structural optimization of thin-walled structures had a greater amount contribution to auto body performance likened with material replacement was established by Sun et al. [34]. For cross-sectional optimization finite element technique is a very operational tool, the automatic design of thin-walled beams by FEM technique was informed by abundant canvassers [35,36,37]. Software such as SuperSection [38] and the system of vehicle body concept design (VCD-ICAE) [39] were very widespread but were typically practical for conceptual design procedure and this issue, however, it is substantial to repercussions for car body upgradation when body configuration and load condition were given, therefore the analysis on the association concerning cross-sectional physiognomies and the property performance of car body chunks, and for lightweight optimization the donations of geometrical dimensions needs to be scrutinized.

To acquire the light vehicle body structure while nourishing the inclusive bending and torsional stiffness, Suh et al. [40] elevated the subdivision possessions of each frame component. Firstly, they recommended the technique to take the design variables in place of the section properties. In order to examine the optimal section properties of beam structure, Yim et al. [41] established the design methodology. The optimal section of vehicle body structure that has only rectangular and circular sections was delivered by Nishio and Igarashi [42]. Stature, breadth, radius, and wideness of the segment of every member of the frames as the design variables was taken into consideration. The optimal structure shapes and plate thickness of apparatuses through the design of experiment in amalgamation with the design procedure for optimizing structures was presented by Mamoru et al. [43]. Even so, the amassing of know-how about the examination is indispensable. For the reduction of the heaviness and upsurge in the static stiffness and developed modal features Ha et al. [44] utilized structural optimization technique with chassis border chunkiness and figure limitation.

The elasticity of junctures is unsurprisingly plagiaristic by presenting higher-order cross-section deformations such as warping and distortion for an instance, implementing the higher-order thin-walled beam analysis by Kim and Kim [45,46,47]. Bearing in mind the continuity of three-dimensional displacements, matching conditions at a joint among one-dimensional beam deformation measures are found by In Jang et al. [48] and Jang and Kim [49]. Without the introduction of any artificial stiffness, coupling performance at a joint amongst beam cross-section deformations can be derived in their investigation. To counterpart arbitrarily-oriented thin-walled box beam rudiments for out-of-plane bending complications, Choi et al. [50] derived a joint transformation matrix. Joints associated with three box beams, were scrutinized in [51,52,53] for out-of-plane bending difficulties, and the outcomes were presented to be ominously adjacent to those acquired by pure shell elements such as T-joints. The joint corresponding circumstances for higher order thin-walled beams in [48,49,50,51,52,53] are only effective for rectangular cross sections. Contemporary beam theories such as the generalized beam theory [19,20,21,22] and the Carrera unified formulation [23,24,25] are also consider by the Higher-order cross-section modes.

Description of the Problem

In this case, 2 Ro-Sections and 2 T-Cases are joined. The Ro-Sections are 88,9 × 2,9 and the T-Sections are T100, T120 and T140. The following combinations were then formed:

  • Ro 88,9 × 2,9 and T100

  • Ro 88,9 × 2,9 and T120

  • Ro 88,9 × 2,9 and T140

The following diagram shows the layout of the complex profile in 2D. To use the concept of thin-walled approximation, the steel sections are simplified to plain circles and rectangles with constant thickness. In this particular arrangement, the two Ro sections sit perfectly and symmetrically on the T-Sections. The reference axis is at the centre of the left circle (Fig. 1):

Fig. 1
figure 1

Layout of the complex profile

Next, the two-dimensional representation of the complex steel sections is converted into smaller elements represented by a either a line or a curve, each having two points and a defined thickness. The following diagram shows how the nodes are connected to create the profile for the thin-walled approximation (Fig. 2):

Fig. 2
figure 2

Nodes that form the complex profile

Theoretical Background

Thin-walled approximation is a very easy way to estimate the section properties. It uses a very simple concept, in which the area of an object is replaced with a line and a fixed thickness. This means that it forms a rectangle for each object. This must be kept in mind when dealing with curves and fillets.

Area of Section

The area is approximately the sum of the areas of the lines of the thin walled model, if only rectangles are used:

$$A_{{{\text{total}}}} = \int\limits_{a} {e_{\mu } \cdot {\text{d}}A} \approx \mathop \sum \limits_{i = 1}^{n} e_{\mu ,i} \cdot L_{i} \cdot t_{i} ,$$

with:

  • \(L_{i}\) the length of line i

  • \(t_{i}\) the thickness of line i

  • \(e_{\mu ,i}\) the relative elasticity of line i (1 for only one material)

First Moments of Area

The first moments of an area are the area integrals given below. The \(\left( {x,y} \right)\) values are related to a given coordinate system:

$$S_{x} = \int\limits_{A} {e_{\mu } \cdot y \cdot {\text{d}}A} \approx \mathop \sum \limits_{i = 1}^{n} e_{\mu ,i} \cdot \overline{{y_{i} }} \cdot A_{i} ,$$
$$S_{y} = \int\limits_{A} {e_{\mu } \cdot x \cdot {\text{d}}A} \approx \mathop \sum \limits_{i = 1}^{n} e_{\mu ,i} \cdot \overline{{x_{i} }} . A_{i} ,$$

with:

  • \(A_{i}\) the area of line i

  • \(\overline{{x_{i} }}\) the x coordinate of the center of line i

  • \(\overline{{y_{i} }}\) the y coordinate of the center of line i

Center of Mass

The coordinates of the center of mass are calculated with the arithmetic mean because the numerator of the arithmetic mean is identical with the first moment of the area and the denominator is identical with the area of the profile:

$$x_{{\text{c}}} = \frac{{\int_{A} {x \cdot {\text{d}}A} }}{{\int_{A} {{\text{d}}A} }} \approx \frac{{S_{x} }}{{A_{{{\text{total}}}} }} ,$$
$$y_{{\text{c}}} = \frac{{\int_{A} {y \cdot {\text{d}}A} }}{{\int_{A} {{\text{d}}A} }} \approx \frac{{S_{y} }}{{A_{{{\text{total}}}} }},$$

Second Moment of Inertia

First, the second moment of inertia is calculated with respect to user specified coordinates, where x and y show the coordinates with respect to the moment of inertia has to be calculated. If there is a given arbitrary coordinate system in general there are three values of inertia the Ix, the Iy and the mixed Ixy.

$$I_{x} = \mathop \sum \limits_{i = 1}^{n} \left( {\frac{{\left( {y_{b,i} - y_{a,i} } \right)^{2} }}{12} + \left( {\overline{y}_{i} } \right)^{2} } \right) \cdot A_{i} ,$$
$$I_{y} = \mathop \sum \limits_{i = 1}^{n} \left( {\frac{{\left( {x_{b,i} - x_{a,i} } \right)^{2} }}{12} + \left( {\overline{x}_{i} } \right)^{2} } \right) \cdot A_{i} ,$$
$$I_{xy} = \mathop \sum \limits_{i = 1}^{n} \left( {\frac{{\left( {x_{b,i} - x_{a,i} } \right)^{2} \left( {y_{b,i} - y_{a,i} } \right)^{2} }}{12} + \left( {\overline{x}_{i} .\overline{y}_{i} } \right)^{2} } \right) \cdot A_{i} ,$$

with:

  • \(A_{i}\) the area of line i

  • \(\overline{x}_{i}\) the x coordinate of the center of the line i

  • \(\overline{y}_{i}\) the y coordinate of the center of the line i

  • \(x_{a,i}\) the x coordinate of the first point of the line i

  • \(y_{a,i}\) the y coordinate of the first point of the line i

  • \(x_{b,i}\) the x coordinate of the second point of the line i

  • \(y_{b,i}\) the y coordinate of the second point of the line i

Next, the second moment of inertia needs to be shifted with respect to the centre of gravity (COG). If the center of mass coordinates are known, the moments of inertia with respect to the center of mass using Steiner’s Theorem can be calculated as follows.

$$I_{{x,{\text{c}}}} = I_{x} - y_{{\text{c}}}^{2} \cdot A,$$
$$I_{{y,{\text{c}}}} = I_{y} - x_{{\text{c}}}^{2} \cdot A,$$
$$I_{{xy,{\text{c}}}} = I_{xy} - x_{{\text{c}}} y_{{\text{c}}} \cdot A.$$

Error-Checking

The following conditions are checked so that the program doesn’t give any errors upon its execution stage:

  • all dimensions should be non-negative

  • thickness should be positive and not be less than precision

  • the node and element numbering should not be zero

  • the dimensions should be such that the profile can be formed and there is sufficient space left for individual elements to be placed

Analytic Solution

In this section, the results are calculated analytically. Later they will be compared with the results given by the program to determine the accuracy of the program and to ascertain the reliability of the values obtained:

Config-1: T100 and R088,9 × 2,9

The configuration of the steel section is divided into separate sections so that each section is dealt separately to get the final values. This is represented the following Fig. 3 with name notation. Such a notation is necessary for easier calculations and also for later reference.

Fig. 3
figure 3

Layout for Config-1

The total area of the profile is to be calculated to further calculate COG. This is done by specifically calculating the areas of the four different regions:

$$\begin{array}{*{20}c} {A_{1} = { }7.84{ }\;{\text{cm}}^{2} } & \quad {A_{3} = { }20.9{ }\;{\text{cm}}^{2} } \\ {A_{2} = { }20.9{ }\;{\text{cm}}^{2} } & \quad {A_{4} = { }7.84\;{\text{ cm}}} \\ \end{array}$$
$$A_{{{\text{total}}}} = A_{1} + A_{2 } + A_{3} + A_{4} = 57.48\;{\text{ cm}}^{2} .$$

COG of elements w.r.t to the reference axis in the layout is given by:

$$\begin{array}{*{20}c} {x_{{{\text{c}},i}} = \frac{{A_{i} \times x_{i} }}{{A_{i} }}} & {x_{{{\text{c}},1}} = \frac{7.84 \times 0}{{7.84}} = 0 \;{\text{cm}}} \\ {y_{{{\text{c}},i}} = \frac{{A_{i} \times y_{i} }}{{A_{i} }}} & {y_{{{\text{c}},1}} = \frac{7.84 \times 0}{{7.84}} = 0 \;{\text{cm}}} \\ \end{array}$$

Each down element, as shown in the figure, is multiplied with a distance it is away in both x and y directions from the reference axis (drawn in the figure as well). The rectangular area is further divided for simplification in calculations.

$$x_{{{\text{c}},2}} = \frac{{\left( {\left( {11 \times 0} \right) + \left( {9.79 \times \left( {4.45 + \frac{1.1}{2}} \right)} \right)} \right)}}{{\left( {9.79 + 11} \right)}} = 2.35\;{\text{ cm}},$$
$$y_{{{\text{c}},2}} = \frac{{\left( {\left( {11 \times \left( { - 5 - \frac{8.9}{2}} \right)} \right) + \left( {9.79 \times \left( { - 5 - \frac{8.9}{2}} \right)} \right)} \right)}}{{\left( {11 + 9.79} \right)}} = - 9.45 \;{\text{cm,}}$$
$$x_{{{\text{c}},3}} = \frac{{\left( {\left( {11 \times \left( {20 - 1.1} \right)} \right) + \left( {9.79 \times \left( {10 - \frac{1.1}{2} + 8.9/2} \right)} \right)} \right)}}{{\left( {9.79 + 11} \right)}} = 16.55 \;{\text{cm,}}$$
$$y_{{{\text{c}},3}} = \frac{{\left( {\left( {11 \times \left( { - 5 - \frac{8.9}{2}} \right)} \right) + \left( {9.79 \times \left( { - 5 - \frac{8.9}{2}} \right)} \right)} \right)}}{{\left( {11 + 9.79} \right)}} = - 9.45 \;{\text{cm,}}$$
$$x_{{{\text{c}},4}} = \frac{{7.84 \times \left( {20 - 1.1} \right)}}{7.84} = 18.9 \;{\text{cm}},$$
$$y_{{{\text{c}},4}} = \frac{7.84 \times 0}{{7.84}} = 0.$$

COG of the complex profile is calculated using the values from the previous steps. It is calculated by summing up the products of the area of the elements with its respective relative COG. For each axis, the value is calculated separately:

$$\begin{array}{*{20}c} {x_{{\text{c}}} = \mathop \sum \limits_{i = 1}^{4} \frac{{A_{i} \times x_{{{\text{c}}i}} }}{{A_{i} }}} & {y_{{\text{c}}} = \mathop \sum \limits_{i = 1}^{4} \frac{{A_{i} \times y_{{{\text{c}}i}} }}{{A_{i} }}} \\ \end{array}$$
$${x}_{\mathrm{c}}=\frac{\left(\left(7.84\times 0\right)+\left(20.79 \times 2.35\right)+ \left(20.79\times 16.55\right)+ \left(7.84\times 18.9\right)\right)}{(7.84+20.79+20.79+7.84)}=9.45 \mathrm{cm},$$
$${y}_{c}=\frac{\left(\left(7.84\times 0\right)+\left(20.79 \times -9.45\right)+ \left(20.79\times -9.45\right)+ \left(7.84\times 0\right)\right)}{(7.84+20.79+20.79+7.84)}=-6.86 \mathrm{cm}.$$

The reason for calculating the global COG is to find the moment of inertia of the complex profile. To achieve this, firstly the moment of inertia of each element needs to be calculated for each axis separately.

The following are the moments of inertia of each element:

$$\begin{array}{*{20}c} {I_{x,1} = 72.5 \;{\text{cm}}^{4} } & {I_{y,1} = 72.5 \;{\text{cm}}^{4} } \\ {I_{x,2} = 88.3\;{\text{ cm}}^{4} } & {I_{y,2} = 179 \;{\text{cm}}^{4} } \\ {I_{x,3} = 88.3 \;{\text{cm}}^{4} } & {I_{y,3} = 179\;{\text{ cm}}^{4} } \\ {I_{x,4} = 72.5 \;{\text{cm}}^{4} } & {I_{y,4} = 72.5\;{\text{cm}}^{4} } \\ \end{array}$$

Now, the moment of inertia of each element with respect to the COG can be calculated. This can be done by adding to the COG of the element with the product of area of the element with the square of the distance between the global COG and the COG of that particular element in itself. This is done for each side:

$$\begin{array}{*{20}c} {I_{xx,i} = I_{x} + A_{i} \left( {y_{{\text{c}}} - y_{{{\text{c}}i}} } \right)^{2} } & {I_{yy,i} = I_{y} + A_{i} \left( {x_{{\text{c}}} - x_{{{\text{c}}i,}} } \right)^{2} } \\ {I_{xx,1} = 7.84\left( {0 + 6.86} \right)^{2} + 72.5 = 443 \;{\text{cm}}^{4} } & {I_{yy,1} = 7.84\left( {0 - 9.45} \right)^{2} + 72.5 = 773 \;{\text{cm}}^{4} } \\ {I_{xx,2} = 20.79\left( { - 9.445 + 6.86} \right)^{2} + 88.3 = 227 \;{\text{cm}}^{4} } & {I_{yy,2} = 20.79\left( {2.35 - 9.45} \right)^{2} + 179 = 1231 \;{\text{cm}}^{4} } \\ {I_{xx,3} = 20.79\left( { - 9.445 + 6.86} \right)^{2} + 88.3 = 227\;{\text{cm}}^{4} } & {I_{yy,3} = 20.79\left( {2.35 - 9.45} \right)^{2} + 179 = 1231 \;{\text{cm}}^{4} } \\ {I_{xx,4} = 7.84\left( {0 + 6.86} \right)^{2} + 72.5 = 443 \;{\text{cm}}^{4} } & {I_{yy,4} = 7.84\left( {0 - 9.45} \right)^{2} + 72.5 = 773 \;{\text{cm}}^{4} } \\ \end{array}$$

The final moment of inertia is sum of each moment of inertia per element for each axis respectively. This is done shown below:

$$I_{xx} = 443 + 227 + 227 + 443 = 1340\; {\text{cm}}^{4} ,$$
$$I_{yy} = 773 + 1231 + 1231 + 773 = 4008 \;{\text{cm}}^{4} .$$

The same steps are carried out for the next two configurations.

Config-2: T120 and R088,9 × 2,9

Total area of the profile (Fig. 4):

$$\begin{array}{*{20}c} {A_{1} = { }7.84{ }\;{\text{cm}}^{2} } & {A_{3} = { }29.6{ }\;{\text{cm}}^{2} } \\ {A_{2} = { }29.6{ }\;{\text{cm}}^{2} } & {A_{4} = { }7.84{ }\;{\text{cm}}^{2} } \\ \end{array}$$
$$A_{{{\text{total}}}} = A_{1} + A_{2 } + A_{3} + A_{4} = 74.88\;{\text{ cm}}^{2} .$$
Fig. 4
figure 4

Layout of Profile for Config-2

COG of elements w.r.t to the axis in the layout:

$$\begin{array}{*{20}l} {x_{{{\text{c}},i}} = ~\frac{{A_{i} \times x_{i} }}{{A_{i} }}} & {x_{{{\text{c}},1}} = ~\frac{{7.84 \times 0}}{{7.84}} = 0~\;{\text{cm}}} \\ {y_{{{\text{c}},i}} = ~\frac{{A_{i} \times y_{i} }}{{A_{i} }}} & {y_{{{\text{c}},1}} = ~\frac{{7.84 \times 0}}{{7.84}} = 0~\;{\text{cm}}} \\ \end{array}$$
$$x_{{{\text{c}},2}} = \frac{{\left( {\left( {15.6 \times 0} \right) + \left( {13.91 \times \left( {5.35 + \frac{1.3}{2}} \right)} \right)} \right)}}{{\left( {15.6 + 13.91} \right)}} = 2.83\;{\text{cm}},$$
$$y_{{{\text{c}},2}} = \frac{{\left( {\left( {15.6 \times \left( { - 6 - \frac{8.9}{2}} \right)} \right) + \left( {13.91 \times \left( { - 6 - \frac{8.9}{2}} \right)} \right)} \right)}}{{\left( {15.6 + 13.91} \right)}} = - 10.45\;{\text{cm,}}$$
$$x_{{{\text{c}},3}} = \frac{{\left( {\left( {15.6 \times \left( {24 - 1.3} \right)} \right) + \left( {13.91 \times \left( {5.35 + 12 - \frac{1.3}{2}} \right)} \right)} \right)}}{{\left( {15.6 + 13.91} \right)}} = 19.87\;{\text{cm,}}$$
$$y_{{{\text{c}},3}} = \frac{{\left( {\left( {15.6 \times \left( { - 6 - \frac{8.9}{2}} \right)} \right) + \left( {13.91 \times \left( { - 6 - \frac{8.9}{2}} \right)} \right)} \right)}}{{\left( {15.6 + 13.91} \right)}} = - 10.45\;{\text{cm,}}$$
$$x_{{{\text{c}},4}} = \frac{{7.84 \times \left( {24 - 1.3} \right)}}{7.84} = 22.7\; {\text{cm,}}$$
$$y_{c,4} = \frac{7.84 \times 0}{{7.84}} = 0.$$

COG of combined profile:

$$\begin{array}{*{20}c} {x_{{\text{c}}} = \mathop \sum \limits_{i = 1}^{4} \frac{{A_{i} \times x_{{{\text{c}}i}} }}{{A_{i} }}} & \quad {y_{{\text{c}}} = \mathop \sum \limits_{i = 1}^{4} \frac{{A_{i} \times y_{{{\text{c}}i}} }}{{A_{i} }}} \\ \end{array}$$
$$x_{{\text{c}}} = \frac{{\left( {\left( {7.84 \times 0} \right) + \left( {29.51 \times 2.83} \right) + \left( {29.51 \times 19.87} \right) + \left( {7.84 \times 22.7} \right)} \right)}}{{\left( {7.84 + 29.51 + 29.51 + 7.84} \right)}} = 11.35 \;{\text{cm,}}$$
$$y_{{\text{c}}} = \frac{{\left( {\left( {7.84 \times 0} \right) + \left( {29.51 \times - 10.45} \right) + \left( {29.51 \times - 10.45} \right) + \left( {7.84 \times 0} \right)} \right)}}{{\left( {7.84 + 29.51 + 29.51 + 7.84} \right)}} = - 8.26\;{\text{cm}}{.}$$

Moment of Inertia of each Element w.r.t COG:

$$\begin{array}{*{20}c} {I_{x,1} = 72.5 \;{\text{cm}}^{4} } & \quad {I_{y,1} = 72.5 \;{\text{cm}}^{4} } \\ {I_{x,2} = 178\;{\text{cm}}^{4} } & \quad {I_{y,2} = 366 \;{\text{cm}}^{4} } \\ {I_{x,3} = 178 \;{\text{cm}}^{4} } & \quad {I_{y,3} = 366 \;{\text{cm}}^{4} } \\ {I_{x,4} = 72.5\; {\text{cm}}^{4} } & \quad {I_{y,4} = 72.5\;{\text{cm}}^{4} } \\ \end{array}$$

Now the moment of inertia of each element w.r.t COG is calculated by:

$$\begin{array}{*{20}l} {I_{xx,i} = I_{x} + A_{i} \left( {y_{{\text{c}}} - y_{{{\text{c}}i}} } \right)^{2} } & {I_{xx,4} = 7.84\left( {0 + 8.26} \right)^{2} + 72.5 = 608 \;{\text{cm}}^{4} } \\ {I_{yy,i} = I_{y} + A_{i} \left( {x_{{\text{c}}} - x_{{{\text{c}}i,}} } \right)^{2} } & {I_{yy,1} = 7.84\left( {0 - 11.35} \right)^{2} + 72.5 = 1082 \;{\text{cm}}^{4} } \\ {I_{xx,1} = 7.84\left( {0 + 8.26} \right)^{2} + 72.5 = 608 \;{\text{cm}}^{4} } & {I_{yy,2} = 29.51\left( {2.82 - 11.35} \right)^{2} + 366 = 2516 \;{\text{cm}}^{4} } \\ {I_{xx,2} = 29.51\left( { - 10.45 + 8.26} \right)^{2} + 178 = 320 \;{\text{cm}}^{4} } & {I_{yy,3} = 29.51\left( {2.35 - 11.35} \right)^{2} + 366 = 2516\;{\text{cm}}^{4} } \\ {I_{xx,3} = 29.51\left( { - 10.45 + 8.26} \right)^{2} + 178 = 320\;{\text{cm}}^{4} } & {I_{yy,4} = 7.84\left( {0 - 11.35} \right)^{2} + 72.5 = 1082 \;{\text{cm}}^{4} } \\ \end{array}$$

Final Moments of Inertia:

$$\begin{array}{*{20}c} {I_{xx} = 608 + 320 + 320 + 608 = 1855 \;{\text{cm}}^{4} } & {I_{yy} = 1082 + 2516 + 2516 + 1082 = 7196 \;{\text{cm}}^{4} } \\ \end{array}$$

Config-3: T140 and R088,9 × 2,9

Total area of the profile (Fig. 5):

$$\begin{array}{*{20}c} {A_{1} = { }7.84\;{\text{cm}}^{2} } & {A_{3} = { }39.9\;{\text{cm}}^{2} } \\ {A_{2} = { }39.9\;{\text{cm}}^{2} } & {A_{4} = { }7.84{ }\;{\text{cm}}^{2} } \\ \end{array}$$
$$A_{{{\text{total}}}} = A_{1} + A_{2 } + A_{3} + A_{4} = 95.48 \;{\text{cm}}^{2} .$$
Fig. 5
figure 5

Layout of Profile for Config-3

COG of elements w.r.t to the axis in the layout:

$$\begin{array}{*{20}c} {x_{{{\text{c}},i}} = \frac{{A_{i} \times x_{i} }}{{A_{i} }}} & {y_{{{\text{c}},i}} = \frac{{A_{i} \times y_{i} }}{{A_{i} }}} \\ \end{array}$$
$$\begin{gathered} x_{{{\text{c}},1}} = \frac{7.84 \times 0}{{7.84}} = 0 \;{\text{cm}} \hfill \\ y_{{{\text{c}},1}} = \frac{7.84 \times 0}{{7.84}} = 0 \;{\text{cm}} \hfill \\ \end{gathered}$$
$$y_{{{\text{c}},1}} = \frac{7.84 \times 0}{{7.84}} = 0 \;{\text{cm,}}$$
$$x_{{{\text{c}},2}} = \frac{{\left( {\left( {21 \times 0} \right) + \left( {18.75 \times \left( {6.25 + \frac{1.5}{2}} \right)} \right)} \right)}}{{\left( {21 + 18.75} \right)}} = 3.30 \;{\text{cm}},$$
$$y_{{{\text{c}},2}} = \frac{{\left( {\left( {21 \times \left( { - 7 - \frac{8.9}{2}} \right)} \right) + \left( {18.75 \times \left( { - 7 - \frac{8.9}{2}} \right)} \right)} \right)}}{{\left( {21 + 18.75} \right)}} = - 11.45 \;{\text{cm,}}$$
$$x_{{{\text{c}},3}} = \frac{{\left( {\left( {21 \times 26.5} \right) + \left( {18.75 \times \left( { - 6.25 + 14 - \frac{1.5}{2}} \right)} \right)} \right)}}{{\left( {21 + 18.75} \right)}} = 23.20\;{\text{cm,}}$$
$$y_{{{\text{c}},3}} = \frac{{\left( {\left( {21 \times 0} \right) + \left( {18.75 \times \left( {6.25 + \frac{1.5}{2}} \right)} \right)} \right)}}{{\left( {21 + 18.75} \right)}} = - 11.45\;{\text{cm,}}$$
$$\begin{array}{*{20}c} {x_{{{\text{c}},4}} = \frac{{7.84 \times \left( {28 - 1.5} \right)}}{7.84} = 26.5 \;{\text{cm}}} & {y_{{{\text{c}},4}} = \frac{7.84 \times 0}{{7.84}} = 0} \\ \end{array} .$$

COG of combined profile:

$$\begin{array}{*{20}c} {x_{{\text{c}}} = \mathop \sum \limits_{i = 1}^{4} \frac{{A_{i} \times x_{{{\text{c}}i}} }}{{A_{i} }}} & {y_{{\text{c}}} = \mathop \sum \limits_{i = 1}^{4} \frac{{A_{i} \times y_{{{\text{c}}i}} }}{{A_{i} }}} \\ \end{array}$$
$$\begin{aligned} x_{{\text{c}}} = & \frac{{\left( {\left( {7.84 \times 0} \right) + \left( {39.75 \times 3.30} \right) + \left( {39.75 \times 23.19} \right) + \left( {7.84 \times 26.5} \right)} \right)}}{{\left( {7.84 + 39.75 + 39.75 + 7.84} \right)}} = 13.25\;{\text{cm}} \\ y_{{\text{c}}} = & \frac{{\left( {\left( {7.84 \times 0} \right) + \left( {39.75 \times - 11.45} \right) + \left( {39.75 \times - 11.45} \right) + \left( {7.84 \times 0} \right)} \right)}}{{\left( {7.84 + 39.75 + 39.75 + 7.84} \right)}} = - 9.56\;{\text{cm}}{.} \\ \end{aligned}$$

The following are the moments of inertia of each element:

$$\begin{array}{*{20}c} {I_{x,1} = 72.5 \;{\text{cm}}^{4} } & {I_{y,1} = 72.5\;{\text{ cm}}^{4} } \\ {I_{x,2} = 330\;{\text{cm}}^{4} } & {I_{y,2} = 660 \;{\text{cm}}^{4} } \\ {I_{x,3} = 330\;{\text{cm}}^{4} } & {I_{y,3} = 660 \;{\text{cm}}^{4} } \\ {I_{x,4} = 72.5\;{\text{cm}}^{4} } & {I_{y,4} = 72.5\;{\text{ cm}}^{4} } \\ \end{array}$$

Now the moment of inertia of each element w.r.t COG is calculated as:

$$\begin{array}{*{20}c} {I_{xx,i} = I_{x} + A_{i} \left( {y_{{\text{c}}} - y_{{{\text{c}}i}} } \right)^{2} } & {I_{yy,i} = I_{y} + A_{i} \left( {x_{{\text{c}}} - x_{{{\text{c}}i}} } \right)^{2} } \\ \end{array}$$
$$\begin{aligned} I_{xx,1} = & \, 7.84\left( {0 + 9.56} \right)^{2} + 72.5 = 790 \;{\text{cm}}^{4} \\ I_{xx,2} = & \, 39.75\left( { - 11.45 + 9.56} \right)^{2} + 330 = 471 \;{\text{cm}}^{4} \\ I_{xx,3} = & \, 39.75\left( { - 11.45 + 9.56} \right)^{2} + 330 = 471 \;{\text{cm}}^{4} \\ I_{xx,4} = & \, 7.84\left( {0 + 9.56} \right)^{2} + 72.5 = 790\;{\text{cm}}^{4} \\ I_{yy,1} = & \, 7.84\left( {0 - 13.25} \right)^{2} + 72.5 = 1449 \;{\text{cm}}^{4} \\ I_{yy,2} = & \, 29.51\left( {2.82 - 13.25} \right)^{2} + 660 = 4609 \;{\text{cm}}^{4} \\ I_{yy,3} = & \, 39.75\left( {3.30 - 13.25} \right)^{2} + 660 = 4609 \;{\text{cm}}^{4} \\ I_{yy,4} = & \, 7.84\left( {0 - 13.25} \right)^{2} + 72.5 = 1449 \;{\text{cm}}^{4} . \\ \end{aligned}$$

Final Moments of Inertia:

$$\begin{aligned} I_{xx} = & 790 + 471 + 471 + 790 = 2523 \;{\text{cm}}^{4} \\ I_{yy} = & 1449 + 4609 + 4609 + 1449 = 12115\;{\text{cm}}^{4} . \\ \end{aligned}$$

Results from Program

The program is coded in such a way that it displays the results in the most efficient way as possible to the user. The display screen consists of initially the individual sections used to create the complex profile. The dimensions of the individual sections are also provided. The result data consists of the moment of inertia of each element separately with respect to the reference axis and then later moment of inertia with respect to the COG. Some extra values (principle values of moment of inertia and rotation angle) are also displayed. The result data is also saved in a log file as well for later use. The following Figs. 6, 7 and 8 show the results from the program for the three configurations dealt with earlier:

Fig. 6
figure 6

Config-1: T100 and R088,9 × 2,9

Fig. 7
figure 7

Config-2: T120 and R088,9 × 2,9

Fig. 8
figure 8

Config-3: T140 and R088,9 × 2,9

Comparison and Error Analysis

To estimate the accuracy of the results, a comparison analysis is carried out. The following Fig. 9 shows the comparison of the results that were analytically solved and those found using the program. The errors are also calculated in percentage. The following formula was used to calculate the errors in the values:

$${\text{Error }}\;\left( \% \right) = \frac{{{\text{Analytical}}\;{\text{solution}} - {\text{solution}}\;{\text{from}}\;{\text{program}}}}{{{\text{Analytical}}\;{\text{solution}}}} \times 100.$$
Fig. 9
figure 9

Comparison of results

Conclusion

Based on the comparison of the results, it can be said that the results given by the program are quite close to the values obtained through the analytical solution. This is an indicator of the reliability of the program. The errors obtained as discussed below:

  • The average error for area is roughly − 2%. This means that the area calculated by the program is more than that of the analytic solution. This is so because by thin-walled approximation, there is an overlap of area at the nodal areas. The analytic solution of the areas was done referring to the predetermined section values.

  • The average error for Ixx is almost 0%. This means that the values of Ixx are accurate.

  • The average error for Iyy is almost − 2%. This shows that the moment of inertia about the horizontal axis calculated by the program is more than the analytic solution and that the program’s value depicts the structure being weaker in bending than it actually is, in other words, it is safer to use the value of Iyy calculated for post-processing by some other software or to use for other purposes since it underestimates the bending strength of the profile. There is no overload as such, which implies that the load acting on the structure will be in other words lesser than it actually is.

For Area, Ixx and Iyy we do not need a factor of safety to use the results since the errors are lesser than 2%. The error is acceptable and therefore these values are reliable and safe to be used. The reason why there are errors is because it must be remembered that the chamfers and fillets of the sections are ignored by the thin-walled approximation. These are replaced by straight lines. Also, the overlapping of areas is another issue why there are errors. In our case, area overlapping takes place at the joining area of the tube and T-Section. This leads to errors in the areas and further, the moments of inertia.

Thin walled approximation technique used to automate the calculations of the properties of complex steel sections using C++ can serve as a base for eventual industrial applications. The program used may be a novel application.