This seems impossible with our technological level, but there's ways around those limitations if we give ourselves a bit of artistic license.
Here's my picture of the dome shape from your other question:
We need a force field to cover that are and be essentially impassable. I can think of two ways to do this - an actual plot-field, which would be hard to explain but actually is a "field" and an alternative approach using a combination of a physical dome, with gaps that it can fill with fields or material to give the same effect.
Since we need a force-field that would block everything, we basically need it to behave like matter. Very tough matter, but matter nonetheless. That means getting through the field should be no different than trying to break through titanium or something like that, albeit thick and tough titanium that can fix itself.
I don't know of any plausible physics that can create such a field - if we could do that, we could create matter out of thin air. However, we can assume you civilization has mastered the means of creating fields that mimic the way that matter works and can project them.
Considering the shape of the field, we'd have to place the generator very far underground to get the intended result (it's effectively a shell of a large sphere). We could alternatively place multiple generators across the city's foundations and create a composite field that would have approximately that shape, but that would be crude for someone who can already create matter fields and placing it underground gives the city the massive advantage of protecting itself from all directions even underground - in other words, enemies can't even dig a tunnel under it to get around the shield.
The problem is, we can't just have a spherical field underground because, to get this dome shape, it would have to be 72km underground:
link to plot
So we'll have to make it extend from a plane under the city, much like this:
link to plot
If shaped this way, we can place a circular plate under the city about 900m, to give us the needed field.
It doesn't end there though because if we just have a field, activating it will affect everything in its range - it won't just create a nice dome. If this was designed the repel matter and we power it, it would make the entire city explode around it. So we need to carefully shape it.
Since we're assuming exotic fields that don't exist yet, lets assume an exotic mechanism for them to work by: they turn electrical energy into tiny vortices and give them spin, making them matter particles (that's pseudoscience technobabble, but hey, it's a force field :P). The red and blue fields create spin in opposite directions, so they cancel each other out. To create matter, they need to reach a threshold, so if the field strength is too low somewhere, nothing happens. By adjusting the red field's strength and compensating with the blue field, we can adjust the thickness of the field's dome.
Using this arrangement, we can cancel the field out inside and prevent the city from exploding. What form would a generator of this kind take? Here's an idea:
The "4f" arrangement seems nice. Just make it spin really fast on all axes.
A probably preferable mechanical solution could be accomplished by having a deployable dome, that forms a mesh when deployed - then it fills the gaps with matter somehow.
I'm thinking of something like this:
But of course, ours would be a lot larger and flatter. Your dome could deploy from the perimeter of the city and once in place, extend titanium panels to fill the gaps. Obviously, it would need some other form of exotic technology to expand so much - perhaps the city has huge stores of molten titanium under it and using some shaping trick it alloys the titanium with tungsten (to give it a higher melting point than plain titanium) and then funnels more titanium through the bars, suspending it through magnetism or something, until it cools into titanium plates.