When /t/ or /d/ is produced, the tip of the tongue is used to touch the upper teeth ridge. So, whether the mouth is open is not so important.