Or would gravity force any object of that size into a sphere?
Whatever or not an artificial structure in space would be deformed to a sphere due to gravitational forces depends on the material. That tells us the gravitational force and the effort-deformation index.
Now, under that idea that we are talking about a..
We can look at the paper The Potato Radius: a Lower Minimum Size for Dwarf Planets That concludes:
Our derivation of the ~ 200 km – 300 km potato radius is related to the fact that on Earth, earthquakes away from subduction zones are confined to depths less than ~ 30 km. This is because plastic or ductile deformation of the rocks below 30 km is enough to relieve the deviatoric stress, or pressure differences – the same ductile deformation that allow potatoes, as they increase in mass, to become spheres.
So, 400km in diameter (note that the conclusion is about the radius) is enough for a body in space to become spherical by its own gravity. Again, how much bigger you can build an structure in space avoiding high sphericity depends on the material.
The lower limit [to maintain spherical form] is met when the mass is so small that the energy of internal gravity per atom has the same magnitude as the energy of the atomic interaction, e(int). Between these mass limits the material comprising the body behaves as a viscous fluid.
The same document gives us the formula:
R(min) ~ [3eI / 12.57GdA]1/2
- R(min) is the minimum radius at which the material would retain sphericity.
- eI is the inter-atomic energy (energy of the bonds).
- G is the gravitational constant.
- d is the material density.
- A is the mass per atom of the material.
The document says that:
For silicates, A ~ 30, d ~ 3x103 kg m-3, G = 6.67x10-11 and eI ~ 10-21 J, so that R(min) ~ 3x105m. The corresponding mass is M(Rmin) ~ 3.4x1020 kg. For a largely water-ice composition the radius may be as low as R(min) ~ 1.6x105 m and the corresponding mass as low as M(Rmin) ~ 1019 kg. Down to this size the body will maintain a spherical shape. Such mass-radius combinations are fully consistent with those observed for the smallest spherical planetary bodies, namely the small satellites Mimas (of Saturn: R = 195 km, M = 3.8x1019 kg) and Miranda (of Uranus: R = 235 km, M = 6.89x1019 kg). The larger asteroids also fit these values.
Made out of Diamond?
Let's take a cylinder of h = 1000 km long and d = 100 km wide (r = 50km).
I'll work in km (kilometers), kg (kilograms) and s (seconds).
- eI = 5.745x10-25 kg km2/s2 (C-C bond)
- A = 1.99442×10-26 kg
- d = 3.515x1012 kg/km3
Taking the formula:
R(min) ~ [3eI / 12.57GdA]1/2
R(min) ~ [(3/12.57G) * (eI/dA)]1/2
R(min) ~ [(3/12.57G) * ((5.745x10-25 kg km2/s2)/((1.99442×10-26 kg) * 3.515x1012 kg/km3))]1/2
R(min) ~ 5413km
That's how big you can make a structure out of diamond before gravity causes it to behave like an viscous fluid and shape to an sphere.
Calculating deformation (hacky way)
I'll start by taking the Young Module for diamond: Y = 1210 GPa (on the high end of the spectrum).
The volume of the cylinder is V = π * r2 * h = π * (50km2) * 1000km = 157080 km3
The mass of the cylinder is M = V * d = 157080 km3 * 3.515x1012 kg/km3 = 5.521x1017 kg
We convert the Young Module to the equivalent Spring Constant and we get k = π * Y / r = k = π * 50km2 * 1210 GPa / 500km = 3.801x1014 N/m
I'll treat the cylinder to be two halves. So, we have two masses of half of 5.521x1017 kg, that is 2.761x1017 kg. And these two masses have their centers 500km apart. So the gravitational force is 2.035x1013 N
Now we can see how much will each of those masses deform by treating them as a spring: x = 2.035x1013 N / 3.801x1014 N/m = 0.05354 m - So the compression is twice that: 0.10708 meters
Meaning that due to gravity the cylinder got compressed by about 10.7 cm (4.21575 inches)
I belive this is not accurate, and I guess this would be solved integrating the mass, but I don't really know how to build the integral. Hopefully somebody can contribute better calculations.
Well, there's Larry Niven's Ringworld which would work fine and wouldn't be susceptible to any torsional stresses of gravitation.
This might be too simple/obvious however.
Engineered structures supported by other means than rigid structure can overcome this limitation. One example is a space fountain which supports own weight using inertia of fast-moving pellets. Another possibility to counteract gravity is by electric field - have the parts charged so that they repel each other, or magnetic field + superconductor.
Dwarf planet Haumea, with dimensions estimated as 1,920 × 1,540 × 990 km, is a real-life example of non-spherical structure larger than 1000 km
While we tend to think about planets as spheres, they are in fact oblate spheroids, due to their rotation. However, it is generally a small enough effect that it can be ignored. Haumea is a special case because, with its light gravity and 4 hours rotation period, it is much more significantly deformed. Interestingly, it didn't cause it to become a flattened sphere as one may expect, but an elongated ellipsoid.