show/hide this revision's text 2 added 40 characters in body

In general you can not expect that $f$ will be flat on $X-U$, but you have a locally finite stratification of $X$ for which $U$ is the dense stratum, and such that $f$ is flat over each strata. This notion is called "platification" (in French) and it was dealed with great details in the paper of Gruson and Raynaud "Techniques de platification d'un module".

show/hide this revision's text 1

In general you can not expect that $f$ will be flat on $X-U$, but you have a locally finite stratification of $X$ such that $f$ is flat over each strata. This notion is called "platification" (in French) and it was dealed with great details in the paper of Gruson and Raynaud "Techniques de platification d'un module".