1 Introduction

A system is defined as the structure in which all the constituents of the system are organized in a specific way and slight disturbance generates complications in it. The combination of different factors which produce complications in any system is called complexity. The phenomenon of complexity has been discussed in many fields of science [1,2,3,4,5,6,7,8,9,10,11]. It varies from field to field and hence an appropriate definition of complexity that fulfils the requirement of all sectors of science has not been attained yet.

The definition of complexity is introduced in the pioneer work of Lopez-Ruiz et al. [7,8,9] via the terms, information and entropy. Information can be a specific data set or knowledge related to a certain object while entropy describes the behavior of a system which is either organized or not. In a system, there may exist many other basic factors through which complexity of the system can be defined, thus it is not sufficient to describe complexity only by the terms, information and entropy. Lopez-Ruiz et al. [7] also introduced the idea of disequilibrium to check complexity instead of these terms and showed that it is more suitable to discuss complexity of the system.

In physics, the complexity factor can be illustrated through ideal systems such as isolated ideal gas and perfect crystal. The isolated ideal gas is completely disordered because it is made of a system of random moving particles. All the particles equally participate and give maximum information about the ideal gas. On the other hand, perfect crystal is entirely arranged in a specific manner and a small amount of portion is enough to describe the behavior of perfect crystal and hence provides minimum information. These are the examples of elementary models which are extreme in order and information. In these models, the behavior of the system can be illustrated without creating any complication, so they have zero complexity. Similarly, disequilibrium would be maximum in the case of perfect crystal while for isolated ideal gas, it would be zero.

The complexity factor is also important on astrophysical scales for self-gravitating systems. These systems have various characteristics such as energy density, pressure, stability, mass-radius ratio and luminosity which have been studied frequently. The phenomenon complexity has been examined in literature [12,13,14,15,16,17] for neutron stars and white dwarfs by using the concept of disequilibrium and information. These terms include the probability distribution which is restated in the form of energy density to investigate complexity for these objects. However, energy density itself is not sufficient to describe complexity because the main factor pressure component of the energy-momentum tensor is missing which plays an important role in the evolution of self-gravitating systems.

Recently, a quite different way is introduced by Herrera [18] to examine the complexity for astrophysical systems. He involved both energy density and pressure to define the complexity for the spherical self-gravitating system instead of information and disequilibrium. In Herrera’s approach, the complexity factor appears in the structure scalars formed by orthogonal splitting of the Riemann tensor. He also used active gravitational mass (or Tolman mass) of the fluid distribution which contains inhomogeneous energy density and anisotropic pressure. The combination of these two terms is summarized in a single scalar function (structure scalar) and is named as complexity factor. This factor vanishes if the energy density is homogenous and pressures are isotropic or the terms including inhomogeneous energy density and anisotropic pressure that cancel the effect of each other. We have extended the work of Herrera by adding the effect of electromagnetic field [19] and found that complexity of the system decreases in the presence of charge.

Generally, cylindrical systems have been used on different scales to examine the behavior of various physical aspects. Particularly in astrophysics, the phenomenon like gravitational collapse, its radiation, rotating celestial objects and rotating fluids (that help to observe the beam of light produced by stars) provide motivation to consider cylindrical symmetry. According to Birkhoff’s theorem, spherically symmetric spacetime is vacuum outside and no gravitational waves are produced from spherical fluid collapse. For this reason, one moves towards another simple symmetry, i.e., cylindrical geometry. Einstein and Rosen [20] found the solutions for gravitational waves in the case of cylindrically symmetric star. Many astrophysical issues have been discussed for cylindrically symmetric distribution. Herrera and Santos [21] analyzed the matching conditions for collapsing cylindrical fluid distributions. They concluded that the radial pressure is non-zero for this cylinder and the time dependent part of radial pressure is proportional to collapsing fluid. Herrera et al. [22] observed the matching conditions and regularity in equations for cylindrical system and showed that incompressible fluid is obtained for conformally flat solutions. Sharif and Yousaf  [23] analyzed the expansion-free condition for cylindrically symmetric distribution including anisotropic pressure and concluded that some solutions satisfy the Darmois junction condition and some solutions show the existence of thin-shell on the boundary.

A wide range of relativistic phenomena have been considered for cylindrical configuration. Sharif and Azam [24] constructed thin-shell wormhole for the cylindrically symmetric black string and concluded that for specific values of different parameters static solutions exist. The same authors [25] studied the instability of cylindrical system with anisotropic fluid distribution and expansion-free condition. They found that stability of the fluid distribution depends upon anisotropic pressure and inhomogeneous energy density. Sharif and Bhatti [26] investigated the instability of charged cylindrical system with expansion-free anisotropic geometry and found that stability of the cylinder is controlled by energy density, electric charge and principal stresses of the fluid. Sharif and Sadiq [27] examined cylindrically symmetric distribution with anisotropic fluid for polytropic equation of state and deduced that among two polytropic models, only one is physically applicable.

In this paper, we consider static cylindrical configuration to discuss the complexity factor. This paper has the following format. In Sect . 2, we formulate some basic equations related to stellar objects while Sect. 3 defines the structure scalars. In Sect. 4, we define the complexity factor and also discuss some astrophysical systems with vanishing complexity. Section 5 provides a brief summary of our results.

2 Basic equations of stellar system

Here, we discuss the basic equations that are required to examine the stellar structure. We consider static cylindrically symmetric interior bounded by hypersurface \(\Sigma \) as

$$\begin{aligned} ds^{2}=-X^{2}dt^{2}+Y^{2}dr^{2}+Z^{2}d\theta ^{2}+\alpha ^{2}Z^{2}dz^{2}, \end{aligned}$$
(1)

where XYZ are functions of r and \(\alpha \) shows the arbitrary constant. For anisotropic fluid distribution, we consider the energy-momentum tensor in the following form

$$\begin{aligned} T^{\lambda }_{\gamma } = \mu u^{\lambda }u_{\gamma }-Ph^{\lambda }_{\gamma }+\Pi ^{\lambda }_{\gamma }, \end{aligned}$$
(2)

where \(\mu \) represents the energy density and

$$\begin{aligned} \Pi ^{\lambda }_{\gamma }= & {} \Pi \left( s^{\lambda }s_{\gamma }+\frac{1}{3}h^{\lambda }_{\gamma } \right) , \quad P = \frac{1}{3}(2P_{\bot }+P_{r}), \nonumber \\ \Pi= & {} (P_{r}-P_{\bot }), \quad h^{\lambda }_{\gamma } = \delta ^{\lambda }_{\gamma }-u^{\lambda }u_{\gamma }. \end{aligned}$$
(3)

Here \(P_{r}\), \(P_{\bot }\) are the only two principal stresses in the fluid distribution. However, for general cylindrically symmetric distribution there are three principal stresses as mentioned in [22]. Defining the four-velocity and four-vector as

$$\begin{aligned} u^{a}=X^{-1}\delta ^{a}_{0}, \quad s^{a}=Y^{-1}\delta ^{a}_{1}, \end{aligned}$$
(4)

with the properties

$$\begin{aligned} u^{a}u_{a}=1,\quad s^{a}s_{a}=-1, \quad s^{a}u_{a}=0. \end{aligned}$$
(5)

The Einstein field equations yield

$$\begin{aligned} 8\pi \mu= & {} \frac{2Z''}{Y^{2}Z}-\frac{2Y'Z'}{Y^{3}Z} +\frac{Z'^{2}}{Z^{2}Y^{2}}, \end{aligned}$$
(6)
$$\begin{aligned} 8\pi P_{r}= & {} -\frac{Z'^{2}}{Y^{2}Z^{2}}-\frac{2X'Z'}{XY^{2}Z}, \end{aligned}$$
(7)
$$\begin{aligned} 8\pi P_{\bot }= & {} -\frac{X''}{XY^{2}}-\frac{Z''}{Y^{2}Z} +\frac{X'Y'}{XY^{3}}-\frac{X'Z'}{XY^{2}Z}+\frac{Y'Z'}{Y^{3}Z}, \end{aligned}$$
(8)

where prime shows derivative with respect to r. The corresponding exterior geometry is considered as [28]

$$\begin{aligned} ds^{2}=\frac{2M}{R}d\nu ^{2}-2dRd\nu +R^{2}(d\theta ^{2}+\alpha ^{2}dz^{2}), \end{aligned}$$
(9)

where M denotes the total mass in the exterior. On the hypersurface \(\Sigma \), the necessary and sufficient conditions for the smooth matching of two metrics (1) and (9) are given in [28]. We take \(Z(r)=r\) as our Schwarzschild coordinate [27], hence the field equations become

$$\begin{aligned} 8\pi \mu= & {} \frac{1}{r^{2}Y^{2}}-\frac{2Y'}{rY^{3}}, \end{aligned}$$
(10)
$$\begin{aligned} 8\pi P_{r}= & {} - \left( \frac{2X'}{rXY^{2}}+\frac{1}{r^{2}Y^{2}} \right) , \end{aligned}$$
(11)
$$\begin{aligned} 8\pi P_{\bot }= & {} -\frac{X''}{XY^{2}}+\frac{Y'X'}{XY^{3}}+\frac{Y'}{rY^{3}}-\frac{X'}{XY^{2}r}. \end{aligned}$$
(12)

Using the conservation law, the following form of hydrostatic equilibrium equation is obtained

$$\begin{aligned} P'_{r}=-\frac{X'}{X}(\mu +P_{r})+\frac{2}{r}(P_{\bot } -P_{r}). \end{aligned}$$
(13)

This is the generalized form of Tolman–Opphenheimer–Volkoff (TOV) equation for anisotropic fluid.

Next, we evaluate two different forms of mass named as C-energy and Tolman mass. The C-energy formula is defined as [29]

$$\begin{aligned} E=\frac{1}{8} \left( 1-\frac{1}{l^{2}}\nabla _{\rho }r \nabla ^{\rho }r \right) , \end{aligned}$$
(14)

and, in our case, it yields

$$\begin{aligned} m(r)\cong {\tilde{E}}=lE=-\frac{r\alpha }{2Y^{2}}\left( 1-\frac{Y^{2}}{4}\right) . \end{aligned}$$
(15)

Simplifying this equation by substituting Eq. (10), we obtain

$$\begin{aligned} m(r)=\frac{\alpha r}{8}-4\pi \alpha \int ^{r}_{0}\mu {\bar{r}}^{2}d{\bar{r}}. \end{aligned}$$
(16)

From Eqs. (10)–(12) and (15), we have the following expression of m

$$\begin{aligned} m= & {} \frac{r\alpha }{8}+8\pi (\mu -P_{r}+P_{\bot }) -\frac{1}{Y^{2}}\left( \frac{r\alpha }{2}+\frac{1}{r^{2}}\right) \nonumber \\&+\frac{1}{XY^{2}}\left( X''-\frac{X'Y'}{Y}-\frac{X'}{r}-\frac{X}{r^{2}} +\frac{XY'}{rY}\right) . \end{aligned}$$
(17)

This expression can be simplified by using the Weyl tensor. For the cylindrical system, the Weyl tensor has two parts one is magnetic part and the other is electric part. For the sake of simplicity, we use the following electric part

$$\begin{aligned} E_{\gamma \lambda }=C_{\gamma \alpha \lambda \delta }u^{\alpha }u^{\delta }, \end{aligned}$$
(18)

where

$$\begin{aligned} C_{\beta \alpha \kappa \gamma } = (g_{\beta \alpha \gamma \lambda }g_{\kappa \gamma \rho \delta }-\eta _{\beta \alpha \gamma \lambda } \eta _{\kappa \gamma \rho \delta })u^{\alpha }u^{\rho }E^{\beta \delta }, \end{aligned}$$
(19)

with \(g_{\kappa \gamma \alpha \beta }=g_{\kappa \alpha }g_{\gamma \beta }-g_{\kappa \beta }g_{\gamma \alpha }\) and \(\eta _{\alpha \beta \mu \nu }\) shows the Levi–Civita tensor. Another form of \(E_{\gamma \lambda }\) is

$$\begin{aligned} E_{\gamma \lambda } = {\mathcal {E}}\left( \frac{1}{3}h_{\gamma \lambda }+s_{\gamma }s_{\lambda }\right) , \end{aligned}$$
(20)

with

$$\begin{aligned} {\mathcal {E}}=X''-\frac{X'Y'}{Y}-\frac{X'}{r}-\frac{X}{r^{2}} +\frac{XY'}{rY}, \end{aligned}$$
(21)

and its non-vanishing components are

$$\begin{aligned} E_{11}=\frac{1}{3X}{\mathcal {E}},\quad E_{22}=-\frac{r^{2}}{6XY^{2}}{\mathcal {E}}'\quad E_{33}=-\frac{\alpha ^{2}r^{2}}{6XY^{2}}{\mathcal {E}}. \end{aligned}$$

We would like to mention here that for the considered fluid distribution, the electric Weyl tensor is defined in terms of a single scalar function \({\mathcal {E}}\) as given in Eq. (20) while in the general case, it is described by two scalar functions [30]. Using Eq. (21) in (17), we obtain

$$\begin{aligned} m=8\pi (\mu -P_{r}+P_{\bot })+\frac{r\alpha }{8} -\frac{1}{Y^{2}}\left( \frac{r\alpha }{2}+\frac{1}{r^{2}}\right) +\frac{{\mathcal {E}}}{XY^{2}}.\nonumber \\ \end{aligned}$$
(22)

From the above equation and Eq. (16), it follows that

$$\begin{aligned} {\mathcal {E}}= & {} \frac{4\pi \alpha XY^{2}}{3}\int ^{r}_{0}{\bar{r}}^{3}\mu ^{'}d{\bar{r}}-\frac{4\pi \alpha XY^{2}r^{3}\mu }{3}\nonumber \\&+\frac{\alpha rX}{2}+\frac{X}{r^{2}}-8\pi XY^{2}\mu +8\pi XY^{2}(P_{r}-P_{\bot }). \end{aligned}$$
(23)

Inserting this value in Eq. (22), the mass function yields

$$\begin{aligned} m=\frac{r\alpha }{8}+\frac{4\pi \alpha }{3}\int ^{r}_{0}{\bar{r}}^{3}\mu ^{'}d{\bar{r}}-\frac{4\pi \alpha \mu r^{3}}{3}. \end{aligned}$$
(24)

The expression of \({\mathcal {E}}\) (23) contains inhomogeneous energy density as well as anisotropic pressure and the corresponding mass function (24) only has inhomogeneous energy density. Using Eq. (15) in (11), it follows that

$$\begin{aligned} \frac{X'}{X}=-16\pi r P_{r}+\frac{2\pi P_{r}r^{2}\alpha }{m}-\frac{1}{2r}. \end{aligned}$$
(25)

Substituting Eq. (25) in (13), the TOV equation becomes

$$\begin{aligned} P'_{r}=\left[ 2\pi P_{r}r\left( 8r-\frac{r\alpha }{m}\right) +\frac{1}{2r} \right] (\mu +P_{r}) +\frac{2}{r}(P_{\bot }-P_{r}).\nonumber \\ \end{aligned}$$
(26)

Tolman [31] defined another definition of energy for static cylindrical system given by

$$\begin{aligned} m_{T}=\pi \alpha \int ^{r_{\Sigma }}_{0} XYr^{2} \left( T^{0}_{0}-T^{1}_{1}-2T^{2}_{2}\right) dr, \end{aligned}$$
(27)

and within the cylindrical configuration of radius r, the total energy for the fluid is

$$\begin{aligned} m_{T}=\pi \alpha \int ^{r}_{0} XY{\bar{r}}^{2}\left( T^{0}_{0}-T^{1}_{1}-2T^{2}_{2} \right) d{\bar{r}}. \end{aligned}$$
(28)

Using Eqs. (10)–(12) in (28), it becomes [32, 33]

$$\begin{aligned} m_{T}=-2\pi \alpha \frac{X'r^{2}}{Y}. \end{aligned}$$
(29)

Substituting the value of \(X'\) from Eq. (25) into (29), we obtain

$$\begin{aligned} m_{T}=\frac{32\pi ^{2}\alpha r^{3}XP_{r}}{Y}-\frac{4\pi ^{2}\alpha ^{2}r^{4}X P_{r}}{m}+\frac{\pi \alpha rX}{Y}. \end{aligned}$$
(30)

Equation (29) may also be termed as active gravitational mass, i.e., Tolman mass and this mass can also be expressed as

$$\begin{aligned} m_{T}= & {} \left( \frac{r}{r_{\Sigma }}\right) ^{3}+2\pi \alpha r^{3}\nonumber \\&\times \int ^{r_{\Sigma }}_{r}\frac{1}{{\bar{r}}Y}\left( X'' +\frac{2X'}{{\bar{r}}}-\frac{X'Y'}{Y}-\frac{6X'}{{\bar{r}}Y^{2}} -\frac{6X}{{\bar{r}}^{2}Y^{2}}+\frac{3X}{2{\bar{r}}^{2}}\right) d{\bar{r}} \nonumber \\&+12\pi ^{2}\alpha ^{2}r^{3}\int ^{r_{\Sigma }}_{r} \frac{(2X'{\bar{r}}+X)}{\alpha \pi {\bar{r}}^{3}Y^{2}-4\pi \alpha {\bar{r}}^{3}+16+8\pi {\bar{r}}^{2}({\mathcal {E}}+4\pi \Pi )}d\bar{ r}\nonumber \\&+ 12\pi ^{2}\alpha ^{2}r^{3}\int ^{r_{\Sigma }}_{r}\frac{(2X'{\bar{r}}+X)}{\frac{48\pi X'{\bar{r}}}{X} -\frac{128\pi ^{2}X''{\bar{r}}^{2}}{X}+\frac{128\pi ^{2}X'Y'{\bar{r}}^{2}}{X}- \frac{256\pi ^{2}X'{\bar{r}}}{X}}d{\bar{r}}. \end{aligned}$$
(31)

Putting the value of \({\mathcal {E}}\) from Eq. (23) in (31), it becomes

$$\begin{aligned} m_{T}= & {} \left( \frac{r}{r_{\Sigma }}\right) ^{3}+2\pi \alpha r^{3}\int ^{r_{\Sigma }}_{r}\frac{1}{{\bar{r}}Y}\left( X'' +\frac{2X'}{{\bar{r}}}-\frac{X'Y'}{Y}-\frac{6X'}{{\bar{r}}Y^{2}} -\frac{6X}{{\bar{r}}^{2}Y^{2}}+\frac{3X}{2{\bar{r}}^{2}}\right) d{\bar{r}} \nonumber \\&+12\pi ^{2}\alpha ^{2}r^{3}\int ^{r_{\Sigma }}_{r} \frac{(2X'{\bar{r}}+X)}{\alpha \pi {\bar{r}}^{3}Y^{2}-4\pi \alpha {\bar{r}}^{3}+16+8\pi {\bar{r}}^{2}(\frac{4\pi \alpha d{\bar{r}} XY^{2}}{3}\int ^{r}_{0}{\bar{r}}^{3}\mu ^{'})}d{\bar{r}} \nonumber \\&+12\pi ^{2}\alpha ^{2}r^{3}\int ^{r_{\Sigma }}_{r} \frac{(2X'{\bar{r}}+X)}{+\frac{\alpha r X}{2}+\frac{X}{r^{2}}-8\pi XY^{2}\mu +8\pi XY^{2}(P_{r}-P_{\bot })+4\pi \Pi )}d{\bar{r}} \nonumber \\&+ 12\pi ^{2}\alpha ^{2}r^{3}\int ^{r_{\Sigma }}_{r}\frac{(2X'{\bar{r}}+X)}{-\frac{4\pi \alpha XY^{2}r^{3}\mu }{3}+\frac{48\pi X'{\bar{r}}}{X} -\frac{128\pi ^{2}X''{\bar{r}}^{2}}{X}+\frac{128\pi ^{2}X'Y'{\bar{r}}^{2}}{X}- \frac{256\pi ^{2}X'{\bar{r}}}{X}}d{\bar{r}}. \end{aligned}$$
(32)

This equation shows the presence of inhomogeneous energy density and anisotropic pressure in the Tolman mass.

3 Structure scalars

Bel [34] proposed orthogonal splitting of the Riemann tensor. Herrera et al. [35] established the structure scalars based on this splitting. These scalars describe the fundamental characteristics of fluid distribution including inhomogeneous energy density, active gravitational mass and anisotropic pressure. With the help of these scalars, we are able to find the complexity factor for self-gravitating systems. The tensors used for the orthogonal splitting of the Riemann tensor are defined as [34,35,36]

$$\begin{aligned} Y_{\gamma \lambda }= & {} R_{\gamma \alpha \lambda \delta }u^{\alpha }u^{\delta }, \end{aligned}$$
(33)
$$\begin{aligned} X_{\gamma \lambda }= & {} ^{*}R^{*}_{\gamma \alpha \lambda \delta }u^{\alpha }u^{\delta }=\frac{1}{2}\eta ^{\epsilon \nu }_{\gamma \alpha }R^{*}_{\epsilon \nu \lambda \delta }u^{\alpha }u^{\delta }, \end{aligned}$$
(34)

where \(R^{*}_{\alpha \beta \gamma \delta }=\frac{1}{2}\eta _{\epsilon \nu \gamma \delta }R^{\epsilon \nu }_{\alpha \beta }\) while the trace-free \((Y_{TF}\), \(X_{TF})\) and trace \((Y_{T}\), \(X_{T})\) parts of these tensors are related as [35, 36]

$$\begin{aligned} Y_{\gamma \lambda }= & {} Y_{TF}\left( \frac{1}{3}h_{\gamma \lambda }+s_{\gamma }s_{\lambda }\right) +\frac{1}{3}Y_{T}h_{\gamma \lambda }, \end{aligned}$$
(35)
$$\begin{aligned} X_{\gamma \lambda }= & {} X_{TF}\left( \frac{1}{3}h_{\gamma \lambda }+s_{\gamma }s_{\lambda }\right) +\frac{1}{3}X_{T}h_{\gamma \lambda }. \end{aligned}$$
(36)

For our fluid distribution, there is only one trace-free part in the tensors \(X_{\gamma \lambda }\) and \(Y_{\gamma \lambda }\) while in the general (cylindrically symmetric) case, there are two trace-free parts [30]. With the help of field equations, the structure scalars are obtained as [36]

$$\begin{aligned} X_{T}= & {} 8\pi \mu , \end{aligned}$$
(37)
$$\begin{aligned} X_{TF}= & {} 4\pi \Pi -{\mathcal {E}}. \end{aligned}$$
(38)

Inserting the value of \({\mathcal {E}}\) from Eq. (23) into (38), we have

$$\begin{aligned} X_{TF}= & {} 4\pi \Pi (1+2XY^{2})+\frac{4\pi \alpha \mu XY^{2}r^{3}}{3}\nonumber \\&-\frac{4\pi \alpha XY^{2}}{3}\int ^{r}_{0}{\bar{r}}^{3}\mu 'd{\bar{r}}-\frac{\alpha rX}{2}-\frac{X}{r^{2}}+8\pi \mu XY^{2}.\nonumber \\ \end{aligned}$$
(39)

The scalars \(X_{T}\) and \(X_{TF}\) control the energy density and inhomogeneous energy density, respectively [35].

Similarly, the scalars \(Y_{T}\) and \(Y_{TF}\) have the following forms

$$\begin{aligned} Y_{T}= & {} 4\pi (\mu -2\Pi +3P_{r}), \end{aligned}$$
(40)
$$\begin{aligned} Y_{TF}= & {} 4\pi \Pi +{\mathcal {E}}. \end{aligned}$$
(41)

Using Eq. (23) in (41), we obtain

$$\begin{aligned} Y_{TF}= & {} 4\pi \Pi (1+2XY^{2})-\frac{4\pi \alpha \mu XY^{2}r^{3}}{3}\nonumber \\&+\frac{4\pi \alpha XY^{2}}{3}\int ^{r}_{0}{\bar{r}}^{3}\mu 'd{\bar{r}}+\frac{\alpha rX}{2}+\frac{X}{r^{2}}-8\pi \mu XY^{2}.\nonumber \\ \end{aligned}$$
(42)

The anisotropic pressure is obtained by adding Eqs. (38) and (41)

$$\begin{aligned} X_{TF}+Y_{TF}=8\pi \Pi . \end{aligned}$$
(43)

Substituting the value of \(Y_{TF}\) from Eq. (41) into (31), we have

$$\begin{aligned} m_{T}= & {} \left( \frac{r}{r_{\Sigma }}\right) ^{3} +2\pi \alpha r^{3}\int ^{r_{\Sigma }}_{r}\frac{1}{{\bar{r}}Y}\left( X'' +\frac{2X'}{{\bar{r}}}-\frac{X'Y'}{Y}-\frac{6X'}{{\bar{r}}Y^{2}} -\frac{6X}{{\bar{r}}^{2}Y^{2}}+\frac{3X}{2{\bar{r}}^{2}}\right) d{\bar{r}} \nonumber \\&+12\pi ^{2}\alpha ^{2}r^{3}\int ^{r_{\Sigma }}_{r} \frac{(2X'{\bar{r}}+X)}{\alpha \pi {\bar{r}}^{3}Y^{2}-4\pi \alpha {\bar{r}}^{3}+16+8\pi {\bar{r}}^{2}(Y_{TF})}d{\bar{r}}\nonumber \\&+ 12\pi ^{2}\alpha ^{2}r^{3}\int ^{r_{\Sigma }}_{r}\frac{(2X'{\bar{r}}+X)}{\frac{48\pi X'{\bar{r}}}{X} -\frac{128\pi ^{2}X''{\bar{r}}^{2}}{X}+\frac{128\pi ^{2}X'Y'{\bar{r}}^{2}}{X}- \frac{256\pi ^{2}X'{\bar{r}}}{X}}d{\bar{r}}. \end{aligned}$$
(44)

The comparison of Eqs. (44) and (31) yields

$$\begin{aligned} \int ^{r_{\Sigma }}_{r} \frac{(2X'{\bar{r}}+X)}{8\pi {\bar{r}}^{2}({\mathcal {E}}+4\pi \Pi )}d{\bar{r}} =\int ^{r_{\Sigma }}_{r} \frac{(2X'{\bar{r}}+X)}{8\pi {\bar{r}}^{2}(Y_{TF})}d{\bar{r}}. \end{aligned}$$
(45)

This indicates that \(Y_{TF}\) is related to the effects of inhomogeneous energy density and pressure anisotropy of the fluid configuration or in other words \(Y_{TF}\) associate these two quantities with the Tolman mass. Equation (27) shows the Tolman mass which can be written in structure scalar form as

$$\begin{aligned} m_{T}=\frac{\alpha }{4}\int ^{r}_{0} XY{\bar{r}}^{2}Y_{T}d{\bar{r}}. \end{aligned}$$
(46)

4 The complexity factor

There are many terms producing complexity in any stellar system like inhomogeneous energy density, viscosity, heat dissipation, electromagnetic field and anisotropic pressure. Negligible complexity has been obtained by considering the simplest system with homogenous energy density and isotropic pressure. However, we consider inhomogeneous energy density plus anisotropic pressure that are responsible to produce complexity in cylindrical system in the absence of other factors. The scalar \(Y_{TF}\) (42) consists of those terms which induce complexity in the system and for this reason, the complexity factor can be associated with \(Y_{TF}\). However, in general for non-static cylindrical system, there are two trace-free parts of tensor \(Y_{\gamma \lambda }\) [30]. Consequently, in this case the combination of these two trace-free parts can define the complexity factor. Furthermore, we discuss the stellar configuration with vanishing complexity condition. For this purpose, we replace \(Y_{TF}=0\) and obtain

$$\begin{aligned} \Pi =\frac{\frac{4\pi \alpha \mu XY^{2}r^{3}}{3}-\frac{4\pi \alpha XY^{2}}{3}\int ^{r}_{0}{\bar{r}}^{3}\mu 'd{\bar{r}}-\frac{\alpha rX}{2}-\frac{X}{r^{2}}+8\pi \mu XY^{2}}{4\pi (1+2XY^{2})}.\nonumber \\ \end{aligned}$$
(47)

The set of three ordinary differential equations is obtained from the field equations with five unknowns \(X,Y,\mu ,P_{r},P_{\bot }\). To find the unique solution of such system, we use the constraint \(Y_{TF}=0\). But still we need another constraint to obtain the unique solution which we fix by using some specific model of self-gravitating system.

Here, we consider two models among various stellar structures models. In the first one, we fix the energy density and radial pressure while in the second the polytropic equation of state is used.

4.1 The first model

In this model, we use the expression of variable energy density and radial pressure proposed by Gokhroo and Mehra [37] that describe the behavior of stellar object. The energy density has the following form

$$\begin{aligned} \mathcal {\mu }=\mathcal {\mu }_{0}\left( 1-\frac{{\mathcal {K}}r^{2}}{r^{2}_{\Sigma }}\right) , \end{aligned}$$
(48)

with \({\mathcal {K}}=(0,1)\) and the radial pressure is defined as

$$\begin{aligned} P_{r}=CY^{-1}\left( 1-\frac{r^{2}}{r^{2}_{\Sigma }}\right) ^{n},\quad n\ge 1, \end{aligned}$$
(49)

where C shows the central pressure. Using the value of \(\mu \) from Eq. (48) in (16), we obtain

$$\begin{aligned} m(r)={\tilde{\alpha }}r^{3}\left( -\frac{1}{3}+ \frac{{\mathcal {K}}r^{2}}{5r^{2}_{\Sigma }}\right) +\frac{r\alpha }{8}, \end{aligned}$$
(50)

and substituting this value in (15), we have

$$\begin{aligned} Y=\sqrt{\frac{\alpha }{2{\tilde{\alpha }}r^{2}\left( -\frac{1}{3}+ \frac{{\mathcal {K}}r^{2}}{5r^{2}_{\Sigma }}\right) }}, \end{aligned}$$
(51)

where \({\tilde{\alpha }}=4\pi \alpha \mu _{0}\). Putting the value of Y from Eq. (51) in (49), we obtain

$$\begin{aligned} P_{r}=\frac{C\left( 1-\frac{r^{2}}{r^{2}_{\Sigma }}\right) ^{n}}{\sqrt{\frac{\alpha }{2{\tilde{\alpha }}r^{2}\left( -\frac{1}{3}+ \frac{{\mathcal {K}}r^{2}}{5r^{2}_{\Sigma }}\right) }}}. \end{aligned}$$
(52)

Using Eq. (50) in (25) and after integration, it follows that

$$\begin{aligned} X=e^{\int (-16\pi r P_{r}+\frac{2\pi P_{r}r^{2}\alpha }{{\tilde{\alpha }}r^{3}\left( -\frac{1}{3}+ \frac{{\mathcal {K}}r^{2}}{5r^{2}_{\Sigma }}\right) +\frac{r\alpha }{8}}-\frac{1}{2r})dr}. \end{aligned}$$
(53)

Now, we form the vanishing complexity condition given in Eq. (47) and obtain the value of \(P_{\bot }\) as

$$\begin{aligned} P_{\bot }=P_{r}-\frac{\frac{4\pi \alpha \mu XY^{2}r^{3}}{3}-\frac{4\pi \alpha XY^{2}}{3}\int ^{r}_{0}{\bar{r}}^{3}\mu 'd{\bar{r}}-\frac{\alpha rX}{2}-\frac{X}{r^{2}}+8\pi \mu XY^{2}}{4\pi (1+2XY^{2})}. \end{aligned}$$
(54)

Hence, we find the unique solution of stellar system by finding five unknowns given in (48), (51)–(54) that describe the energy density, Y, radial pressure, X and tangential pressure, respectively.

4.2 The second model

The polytropic equation of state plays an important role in the self-gravitating systems. In literature [39, 40], polytropes have been studied with anisotropic fluid distribution to examine the behavior of stellar objects. Here, we consider two forms of polytropic equation of state. In the first form, the polytropic equation of state is defined as

$$\begin{aligned} P_{r}=K\mathcal {\mu }^{\rho }=K\mathcal {\mu }^{1+1/n}, \end{aligned}$$
(55)

where K is known as polytropic constant, \(\rho \) is known as polytropic exponent and n is known as polytropic index. Further, we convert the TOV Eq. (13) into dimensionless form by introducing the following dimensionless variables

$$\begin{aligned} \sigma= & {} \frac{P_{rc}}{\mu _{c}}, \quad r=\frac{\varsigma }{A}, \quad A^{2}=\frac{4\pi \mu _{c}}{\sigma (n+1)}, \end{aligned}$$
(56)
$$\begin{aligned} v(\varsigma )= & {} \frac{A^{3}m(r)}{4\pi \mu _{c}}, \quad \varphi ^{n}=\frac{\mu }{\mu _{c}}, \end{aligned}$$
(57)

where subscript c represents that the term is determined at the center. On the boundary, \(r=r_{\Sigma }\) (\(\varsigma =\varsigma _{\Sigma }\)) and \(\varphi (\varsigma _{\Sigma })=0\). Using Eqs. (25) and (55)–(57) in (13), we obtain

$$\begin{aligned}&\frac{d\varphi }{d\varsigma }-\frac{(1+{\hat{\alpha }}\varphi )}{(n+1)}\left[ \frac{16\pi \mu _{c}\varphi ^{n+1}}{A^{2}} \right. \nonumber \\&\left. \quad -\frac{\alpha \varsigma ^{2}\varphi ^{n+1}}{2v}+\frac{1}{2\varsigma {\hat{\alpha }}} \right] -\frac{2\Pi }{(n+1)\varsigma {\hat{\alpha }}\mu _{c}\varphi ^{n}}=0. \end{aligned}$$
(58)

The dimensionless form of Eq. (16) has the following form

$$\begin{aligned} \frac{dv}{d\varsigma }=\frac{\alpha A^{2}}{32\pi \mu _{c}}-\alpha \varsigma ^{2}\varphi ^{n}. \end{aligned}$$
(59)

The three unknown functions \(\varphi ,\Pi ,v,\) appear in (58) and (59). These are two ordinary differential equations and for the unique solution of these equations, we need one additional condition. For this reason, we use dimensionless form of vanishing complexity condition (47) given by

$$\begin{aligned}&\frac{d\Pi }{d\varsigma }A-\Pi \left( X'Y^{2}+2XYY'\right) \left[ \frac{1}{XY^{2}}-\frac{2}{(1+2XY^{2})}\right] \nonumber \\&\quad = \frac{XY^{2}}{4\pi (1+2XY^{2})}\left[ \frac{d\varphi }{d\varsigma }8\pi n\varphi ^{n-1}\mu _{c}A + \frac{4\pi \alpha \varphi ^{n}\mu _{c}\varsigma ^{2}}{A^{2} }\right. \nonumber \\&\left. \qquad -\frac{\alpha }{2Y^{2}}+\frac{\alpha Y'\varsigma }{AY^{3}}+\frac{2A^{3}}{Y^{2}\varsigma ^{3}} +\frac{2Y'A^{2}}{Y^{3}\varsigma ^{2}} \right] . \end{aligned}$$
(60)

Now, we have a system of three Eqs. (58)–(60) having three unknown functions \(\varphi ,\Pi ,v\). Using suitable conditions, this system has a unique solution for any value of \(\sigma \) and n. Physically, this system describes stellar configuration including vanishing complexity condition and satisfies polytropic equation of state.

The second form of polytropic equation of state is considered as \(P_{r}=K\mathcal {\mu }^{\rho }_{b}=K\mathcal {\mu }^{1+1/n}_{b}\), where \(\mu _{b}\) shows the baryonic mass density. Following the same procedure as in the first case, we have

$$\begin{aligned}&\frac{d\varphi }{d\varsigma }-\frac{(1+{\hat{\alpha }}\varphi )}{(n+1)}\left[ \frac{16\pi \mu _{b}\varphi ^{n+1}}{A^{2}} -\frac{\alpha \varsigma ^{2}\varphi ^{n+1}}{2v}+\frac{1}{2\varsigma {\hat{\alpha }}}\right] \nonumber \\&\qquad -\frac{2\Pi }{(n+1)\varsigma {\hat{\alpha }}\mu _{b}\varphi ^{n}}=0. \end{aligned}$$
(61)
$$\begin{aligned}&\frac{d\Pi }{d\varsigma }A-\Pi \left( X'Y^{2}+2XYY'\right) \left[ \frac{1}{XY^{2}}-\frac{2}{(1+2XY^{2})}\right] \nonumber \\&\quad = \frac{XY^{2}}{4\pi (1+2XY^{2})}\left[ 4\pi \alpha r^{2}\left( \varphi ^{n}_{b}\mu _{bc}+\frac{K\varphi ^{n+1}_{b} \mu ^{1+\frac{1}{n}}_{bc}}{\gamma -1}\right) \right. \nonumber \\&\left. \qquad -\frac{\alpha }{2Y^{2}}+\frac{\alpha Y'\varsigma }{AY^{3}}+\frac{2A^{3}}{Y^{2}\varsigma ^{3}} +\frac{2Y'A^{2}}{Y^{3}\varsigma ^{2}} \right] , \end{aligned}$$
(62)

with

$$\begin{aligned} \varphi ^{n}_{b}=\frac{\mu _{b}}{\mu _{bc}}, \end{aligned}$$

while Eq. (59) remains the same. Again, the set of differential Eqs. [(59), (61), (62)] define a stellar object with this equation of state and vanishing complexity factor.

5 Conclusions

The study of astrophysical objects is a captivating phenomenon for researchers which motivates them to explore physical properties of these objects. The physical properties like energy density, anisotropy, stability/instability and luminosity of stellar structure have widely been studied in literature. However, for compact objects, the phenomenon of complexity is not discussed in detail. In this paper, the complexity factor is studied for static cylindrical astrophysical system. We have also investigated vanishing complexity condition using some examples. We have established the field equations and calculated the mass function through two different formalisms namely, C-energy and Tolman mass. We have studied structure scalars and found the complexity factor via these scalars. The complexity factor is given in Eq. (42) which depends upon the inhomogeneous energy density as well as anisotropic pressure implying that these terms produce complexity in the system.

We have also examined the vanishing complexity condition (47) by using \(Y_{TF}=0\) for two types of self-gravitating system. In the first case, we have discussed stellar cylindrical objects with specific energy density and radial pressure introduced by Gokhroo and Mehra [37]. Equations (48), (52) and (54) have been obtained for these objects which interpret the behavior of energy density, radial pressure and tangential pressure, respectively. Next, we have studied the cylindrical stellar configuration satisfying the polytropic equation of state and found a set of differential equations namely, TOV equation, mass equation and vanishing complexity condition in the form of dimensionless variables. With the vanishing complexity condition, this set of differential equations provide the solution for some suitable initial conditions for better understanding of the system.

Finally, we have compared the complexity factor for cylindrical system with the spherical one [18]. The comparison between both the expressions shows that there are some additional terms related to energy density in cylindrical complexity factor which are not present in spherical one.