I am currently working on a system that will calculate the reaction distribution $p(x)$ across a footing with an applied load $P$ and applied moment $M$. There is one case that has me stumped: when the reaction begins to meet the Ultimate Limit State but it remains that $p(x)>0$ for all values of $x$. I have tried to illustrate what it would look like in the below image, where the new distribution would resemble the SLS distribution with the values capping off at the ULS. Eventually, it would resemble the pictured ULS distribution, but I'm not entirely sure how to model that transformation under a changing moment. Any guidance would be appreciated!
For further context, I have the SLS distribution modeled as $$f(x)= \frac{12M}{BD^3}x-\frac{6M}{BD^2}+\frac{P}{BD}$$ where $B$ is the footing width (into the page) and $D$ is the length. The "new" distribution would only begin to apply when $M$ reaches:
$$M=\frac{D(UBD-P)}{6}$$