1. It shall provide the produced U-253 immediately and only retain its existing catalyst.
2. It shall not produce too much U-253 depleting the U-258 reserves.
The basic setup for this looks like this:
![Image](https://forums.factorio.com/images/ext/4cf4821af4d0cd410c9026677e3807e0.jpg)
The U-258 coming from the right is put into an input buffer chest by inserter A which will be deactivated if more than 20 U-258 is in the chest. This chest shall also take in the 40 U-253 it has used as catalyst before and the remaining U-258 from the enrichment process. The input chest fills the centrifuge. The interesting part is how to handle the output, though:
An output chest is filled with U-253 by a filtered stack inserter (B) from the centrifuge. Inserter C shall put the actual gained U-253 from this chest on the output belt, and stack inserter D shall put the 40 U-253 on the side belt to send it back to the centrifuge. Also, a filtered inserter is putting out the remaining U-238 on the top belt for recycling.
To make this work the whole output is divided into three phases. In phase one only the filtered stack inserter B is active and will fill the buffer chest. Once this is done we need to switch to phase two in which inserter C pulls out the gained U-253 (or two, in case the productivity bonus kicked in) on the output belt. In phase three the stack inserter D will put the remaining U-253 onto the side belt.
First I tried to implement a status variable with combinators - and found no way to do it, as there is no simple way to assign a direct value. But finally I had an eureka moment and found a very simple logic to implement all this, although it needs overall 10 combinators.
Inserter B is only active if the output chest contains exactly 0, 12, 24, or 36 U-235. Otherwise it is deactivated. Inserter C has its stack size limited to one and is only active if more than 40 U-253 is in the chest. Inserter D has its stack size limited to 10 and is only active if the chest contains exactly 40, 30, 20, or 10 U-253. The combinator logic behind that is simple - for inserters B and D four comparative combinators each will check if the amount in the chest is equal to one of the allowed numbers, and an arithmetic combinator for each will do the "oring" to provide the actual status signal which the inserters use to be activated. Inserter C doesn't need any combinators at all.
This approach has an interesting side effect - in case the output belt is filled up and inserter C can't drop the U-235, the next cycle will lead to 41 or 42 U-235 in the output chest without the possibility to remove it. This will lock both inserters B and D, thus stopping the process and preventing the drain of U-258. Once a free spot is found on the belt, inserter C can take out more U-253 and restart the enrichment process.
To start the processing, you have to provide U-235 manually. If 40 are put in the input chest it will run with breaks. If 80 U-253 are put into the input chest, it will run continuesly.
This design is tileable, so it can be scaled easily.
The blue print is as follows: