If you are connecting a battery whose rated voltage is less than the ac supply voltage,there are chances of battery getting blown up. So my opinion is not to do this.
Suppose if you are connecting battery of voltage greater than the ac supply voltage, the battery starts discharging until the battery voltage reaches supply voltage. If the battery discharges below the rated voltage,there might be chances of the battery’s lifetime getting decreased.
And if you are connecting battery (this case applicable to lead acid battery) of rated voltage equal to ac supply voltage, a process called desulphation (also called as desulfation) occurs inside the battery which will prolong the life of battery ( Normally pulse width modulated waves sent to the battery for this process , so it is same as giving AC supply). This process is also used in restoring dead lead acid battery.
So coming to conclusion,always know about the battery’s rated voltage,charging voltage and give the correct supply voltage.
When you connect a 20V DC to 220 V AC ,for one half of cycle both voltages will added together or 240 V & for the other half 20 V will be subtracted from 220 V or supply will became of 200 V in circuit.
For a practical case : By ohm\’s law ,because of some internal resistance of the DC cell there will be a current I , which will be different for either cases. If we are using a thick wire ,it will have less resistance and the circuit will burning with due to very high current but if we are using a thin wire having a large value of resistance ,there may be a possibility of current flow.
Note: In general the circuit will burnt due to high voltage.
For ideal case: Here , the cell and wire both became of zero resistance & by ohm\’s law, there will be an infinite current which will burn the circuit.