  A general one-dimensional model for the steady adiabatic motion of
liquid-volatile mixtures in vertical ducts with varying cross-section is
presented. The liquid contains a dissolved part of the volatile and is assumed
to be incompressible and in thermomechanical equilibrium with a perfect gas
phase, which is generated by the exsolution of the same volatile. An inverse
problem approach is used -- the pressure along the duct is set as an input
datum, and the other physical quantities are obtained as output. This
fluid-dynamic model is intended as an approximate description of magma-volatile
mixture flows of interest to geophysics and planetary sciences. It is
implemented as a symbolic code, where each line stands for an analytic
expression, whether algebraic or differential, which is managed by the software
kernel independently of the numerical value of each variable. The code is
versatile and user-friendly and permits to check the consequences of different
hypotheses even through its early steps. Only the last step of the code leads
to an ODE problem, which is then solved by standard methods. In the present
work, the model is applied to the study of two sample cases, representing the
ascent of magma-gas mixtures on the Earth and on a Jupiter's satellite, Io.
Both cases lead to approximate but realistic descriptions of explosive
eruptions, by taking pressure curves as inputs and outputting conduit shapes
together with mixture density, temperature and velocity along the ducts.
