  Gamma-ray burst (GRB) afterglows are emissions from ultrarelativistic blast
waves produced by a narrow jet interacting with surrounding matter. Since the
first multimessenger observation of a neutron star merger, hydrodynamic
modeling of GRB afterglows for structured jets with smoothly varying angular
energy distributions has gained increased interest. While the evolution of a
jet is well described by self-similar solutions in both ultrarelativistic and
Newtonian limits, modeling the transitional phase remains challenging. This is
due to the nonlinear spreading of a narrow jet to a spherical configuration and
the breakdown of self-similar solutions. Analytical models are limited in
capturing these nonlinear effects, while relativistic hydrodynamic simulations
are computationally expensive, which restricts the exploration of various
initial conditions. In this work, we introduce a reduced hydrodynamic model
that approximates the blast wave as an infinitely thin two-dimensional surface.
Further assuming axial symmetry, this model simplifies the simulation to one
dimension and drastically reduces the computational costs. We have compared our
modeling to relativistic hydrodynamic simulations and semianalytic methods, and
applied it to fit the light curve and flux centroid motion of GRB 170817A.
These comparisons demonstrate good agreement and validate our approach. We have
developed this method into a numerical tool, \texttt{jetsimpy}, which models
the synchrotron GRB afterglow emission from a blast wave with arbitrary angular
energy and Lorentz factor distribution. Although the code is built with GRB
afterglow in mind, it applies to any relativistic jet. This tool is
particularly useful in Markov Chain Monte Carlo studies and is provided to the
community.
