I created this Smoke domain.
Then When I added smoke, it didn't stay within the domain, it went through the hole.
I created this Smoke domain.
Then When I added smoke, it didn't stay within the domain, it went through the hole.
Form the blender manual
You can use other shapes of mesh objects as domain objects, but the smoke simulator will use the shape’s bounding box as the domain bounds. In other words, the actual shape of the domain will still be rectangular.
To have the smoke flow around, you would need to add another object and set it as smoke collision.
Smoke Collision objects are used to deflect smoke and influence airflow.
See this answer:What Are the Differences between Smoke Collision Types?
To have the smoke be contained by Collision objects, place the smoke emitters inside them.
In this example a text object has been converted to mesh, set as smoke collision and placed within the smoke domain.
Try adding loop cuts to the domain and shape it as you like. I added 2 loop cuts to a cube and scale the loop cuts and don't use adaptive domain and it follow the shape I wanted. I never tried a rectanguakr shape but it might as well work...