Yes, the ion tail is straightforward since it consists of ions accelerated away from the coma entrained in the solar wind and so it extends radially along the anti-Sun vector. That is easy to calculate.
The dust tail is an orbital mechanics problem. Each dust grain leaves the nucleus at a particular velocity and then it gets accelerated, mainly by solar radiation pressure. The acceleration depends on the mass of the grain and its cross sectional area. Because of this acceleration, each grain moves in a slightly different orbit to the nucleus but the difference in velocities is relatively small and so the grains spread out from the nucleus in the comet’s orbital plane. There are some good online demonstrations of how this is modelled:
https://www.comet-toolbox.com/FP.html
https://hdr-astrophotography.com/comet-tails-simulations/
One of the most spectacular dust tails of recent times was that of C/2006 P1 (McNaught):
https://britastro.org/cometobs/2006p1/thumbnails.html
A detailed description of how that was modelled is here:
https://www.sciencedirect.com/science/article/pii/S0019103518301192