Question: The voltage generated in the transformer must be due to the change in the flux in the coils, but if the voltage is DC, why is no voltage induced?

Of course, we know that voltage is created by the derivative of flux, but what does it mean?

Answer: 
> 
> *but if the voltage is DC, why is no voltage induced?*
> 
> 
> 

It's all a matter of timing, idealities, definitions and perspective.

If you take a regular AC mains transformer of primary inductance circa 10 henry and turns ratio (say) 10:1 then, apply 1 volt to the primary terminals, you will see 0.1 volts induced across across the secondary terminals. This might last for a second or two but, then erodes to zero.

If the transformer was ideal (except for its primary inductance of 10 henry) then you might see 0.1 volts induced across the secondary for maybe 20 seconds or more but then, that voltage erodes to nothing due to the primary current becoming so high (2 amps or more) that the input 1 volt DC supply goes into current limit.

* Can you accept a steady voltage that lasts maybe up to 20 seconds is DC?
* Can you accept that a non-ideal transformer might only produce DC for a couple of seconds?
It seems like you might not understand a basic property of transformers, related to the term `Flux`. Flux is `change`. An AC voltage is one that changes. A DC voltage is one that stays steady (does not change).

If you apply a changing AC voltage to one winding, the flux (change) in the voltage allows the transformer to propagate energy into the other winding, and you get an output AC voltage. If you apply a steady DC voltage to one winding, the lack of flux prevents the transformer from propagating energy into the other winding, and you do not get an output voltage.