I have a similar setup koralia 240 and 2213 in a 18g.
I can tell you the koralia will probably be a bit underpowered for a 40g. It has a very gentle flow in my 18g.
I don't know if the 2215 will give you the flow you want on a 40g as well.. Eheims are pretty weak.
I have intake and outflow same side, with the outflow going across the front of the tank.
The koralia is in the opposite corner aimed slightly up to ripple the water to aerate. (20 minute wave pattern, scheduled to turn on after the CO2 and lights turn off.)
Makes for a circle of flow clock-wise.