theoretical models based on direct numerical simulations have unveiled a new way toward a better comprehension of the rich and complex phenomenology associated with astrophysical plasmas .
finite difference codes such as zeus @xcite or nirvana+ @xcite inaugurated this novel era and have been used by an increasingly large fraction of researchers nowadays . however , as reported in @xcite , the lack of upwinding techniques and conservation properties have progressively moved scientist s attention toward more accurate and robust methods . in this respect ,
the successful employment of the so - called high resolution shock - capturing ( hrsc ) schemes have revealed a mighty tool to investigate fluid dynamics in non - linear regimes . some of the motivations behind their growing popularity is the ability to model strongly supersonic flows while retaining robustness and stability .
the unfamiliar reader is refereed to the books of @xcite , @xcite and references therein for a more comprehensive overview .
implementation of hrsc algorithms is based on a conservative formulation of the fluid equations and proper upwinding requires an exact or approximate solution @xcite to the riemann problem , i.e. , the decay of a discontinuity separating two constant states .
this approach dates back to the pioneering work of @xcite , and it has now become the lead line in developing high resolution codes examples of which include flash ( * ? ? ?
* for reactive hydrodynamics ) , the special relativistic hydro code genesis @xcite , the versatile advection code ( vac , * ? ? ?
* ) or the new nirvana @xcite .
most hrsc algorithms are based on the so - called reconstruct - solve - average ( rsa ) strategy . in this
approach volume averages are first reconstructed using piecewise monotonic interpolants inside each computational cell .
a riemann problem is then solved at each interface with discontinuous left and right states and the solution is finally evolved in time .
it turns out that this sequence of steps is quite general for many systems of conservation laws and , therefore , it provides a general framework under which we have developed a multi - physics , multi - algorithm high resolution code , pluto .
the code is particularly suitable for time - dependent , explicit computations of highly supersonic flows in presence of strong discontinuities and it can be employed under different regimes , i.e. , classical , relativistic unmagnetized and magnetized flows . the code is structured in a modular way allowing a new module to be easily incorporated .
this flexibility turns out to be quite important , since many aspects of computational fluid dynamics are still in rapid development . besides
, the advantage offered by a multi - physics , multi - solver code is also to supply the user with the most appropriate algorithms and , at the same time , provide inter - scheme comparison for a better verification of the simulation results .
pluto is entirely written in the c programming language and can run on either single processor or parallel machines , the latter functionality being implemented through the message passing interface ( mpi ) library .
the code has already been successfully employed in the context of stellar and extragalactic jets @xcite , radiative shocks @xcite , accretion disks @xcite , magneto - rotational instability , relativistic kelvin - helmholtz instability and so forth .
the paper is structured as follows : in  [ sec : code_design ] we give a description of the code design ; in  [ sec : phys ] we introduce the physics modules available in the code ; in  [ sec : source ] we give a short overview on source terms and non - hyperbolicity and in  [ sec : verification ] the code is validated against several standard benchmarks .
[ fig : flow ]    pluto is designed to integrate a general system of conservation laws which we write as @xmath0 here @xmath1 denotes a state vector of conservative quantities , @xmath2 is a rank-2 tensor , the rows of which are the fluxes of each component of @xmath1 and @xmath3 defines the source terms .
additional source terms may implicitly arise when taking the divergence of @xmath2 in a curvilinear system of coordinates .
an arbitrary number of advection equations may be added to the original conservation law ( [ eq : cl ] ) .
although the components of @xmath1 are the primary variables being updated , fluxes are more conveniently computed using a different set of physical quantities which we take as the primitive vector @xmath4 .
this choice is supported , moreover , by the fact that interpolation on primitive variables enforces physical constraints such as pressure positivity and sub - luminal speeds in the case of relativistic flows .
numerical integration of the conservation law ( [ eq : cl ] ) is achieved through shock - capturing schemes using the finite volume ( fv ) formalism where _ volume averages _ evolve in time .
generally speaking , these methods are comprised of three steps : an interpolation routine followed by the solution of riemann problems at zone edges and a final evolution stage . in pluto , this sequence of steps provides the necessary infra - structure of the code , see the schematic diagram in fig .
[ fig : flow ] .    at the higher level ,
the original system of equations is integrated by following this general sequence of steps , regardless any knowledge of the physics involved .
the explicit form of @xmath1 , @xmath4 , @xmath2 and @xmath3 , on the other hand , depends on the particular physical module selected .
thus , at the lower level , a physical module collects the set of algorithms required to compute the terms involved in the discretization of the right hand side of eq .
( [ eq : cl ] ) .
this set should provide one or more riemann solver(s ) , mapper routines for the conversion between primitive and conservative variables , a flux routine giving the components of @xmath2 in each direction , a source term function ( if any ) and a routine to compute the maximum and minimum characteristic speeds of the jacobian matrix .
of course , additional features may be easily added by exploiting the independent modularity .    from the user s perspective
, a particular configuration can be defined through a friendly interface entirely written in the python scripting language .
the interface allows the user to specify all problem - dependent attributes and algorithms , such as number of dimensions , geometry , physics module , reconstruction method , time stepping integration and so forth .
lccc @xmath5 & @xmath6 & @xmath7 & @xmath7 + @xmath8 & @xmath9 & @xmath10 & @xmath11 + @xmath12 & @xmath13 & @xmath13 & @xmath10 + @xmath14 & @xmath15 & @xmath16 & @xmath17 + @xmath18 & @xmath19 & @xmath20 & @xmath21 + @xmath22 & @xmath23 & @xmath23 & @xmath24 + @xmath25 & @xmath26 & @xmath27 & @xmath28 + @xmath29 & @xmath26 & @xmath26 & @xmath30 + @xmath31 & @xmath26 & @xmath26 & @xmath32    pluto employs logically rectangular grids in a generic system of orthogonal curvilinear coordinates @xmath33 ( see table [ tab : geom ] ) .
let @xmath34 , @xmath35 and @xmath36 be the number of points in the three directions .
the lower and upper coordinate bounds of zone @xmath37 are @xmath38 and @xmath39 , respectively , where @xmath40 , @xmath41 , @xmath42 .
the zone widths are then simply given by @xmath43 , @xmath44 , @xmath45 .
the mesh spacing can be either uniform or ( geometrical or logarithmic ) stretched .
parallelization is achieved through domain decomposition : the global domain is divided in sub - domains with an equal number of points and each of the sub - domains is assigned to a processor . by default
the sub - domains are created as maximally cubic , however the user , at run time can specify a different strategy for the creation of the sub - domains , imposing that a given direction can not be subdivided . in the code , parallelization is handled through the mpi library .
grid adaptivity techniques are also being provided . a one dimensional adaptive mesh refinement ( amr )
module based on the @xcite method is distributed with the code and extension to multiple spatial dimensions is currently being developed using the chombo library available at http://seesar.lbl.gov / anag / chombo/. however , since the main goal of this paper is to focus on the code modularity and its performance , amr implementation will be described in future works .    in order to avoid formulas with cluttered notations we omit integer - valued subscripts when referring to three - dimensional quantities .
thus @xmath46 becomes simply @xmath4 .
we introduce the standard two - point difference one - dimensional operator @xmath47 where @xmath48 is a given direction , @xmath49 and @xmath50 are , respectively , the cell s right ( @xmath51 ) and left ( @xmath52 ) interface areas and cell volume in that direction ( see table [ tab : geom ] ) . here
@xmath53 when @xmath48 , respectively .
scalar components of the vectors appearing in eq .
( [ eq : rhs ] ) will be denoted with a pair of square brackets ; e.g. @xmath54}$ ] is the component of @xmath55 contributing to the @xmath56 equation .
furthermore , since several of the building block algorithms are one - dimensional , we will also omit the superscript @xmath57 when unnecessary .
the numerical flux functions @xmath58 in eq .
( [ eq : rhs ] ) follow the solution of 1-d riemann problems at cell interfaces .
since more than one riemann solver may be available in each physics module , we set , without loss of generality , @xmath59 where @xmath60 is the riemann solver being used and @xmath61 , @xmath62 are suitable left and right states at the zone edges perpendicular to the @xmath6 direction .
interpolation routines are designed to reconstruct a piecewise polynomial approximations @xmath63 to @xmath4 inside each cell starting from its cell averages : @xmath64 where @xmath65 ( @xmath66 ) at @xmath67 ( @xmath68 ) . here
@xmath69 is an interpolation routine designated to provide left and right edge interpolated values inside each cell , that is , @xmath70 and @xmath71 , where the  l " and  r " subscripts refer to the sides of the interface .
reconstruction methods have to satisfy monotonicity constraints in order to avoid spurious oscillations in proximity of discontinuities and steep gradients , see the books from @xcite , @xcite and references therein . for second - order linear interpolants , for instance
, one has @xmath72 with the slopes @xmath73 computed following a limiting procedure applied to primitive or characteristic variables .
in the latter case one has @xmath74 where @xmath75 and @xmath76 are , respectively , the right and left eigenvectors of the primitive form of the equations , @xmath77 are forward ( @xmath51 ) and backward ( @xmath52 ) derivatives and @xmath78 labels the @xmath78-th characteristic field .
different slope limiters ( @xmath79 ) are characterized by distinct steepening properties and can be independently assigned to each primitive variable or characteristic field .    at the time of this writing
, pluto allows to choose between either flat ( @xmath80 order in space ) , linear ( @xmath81 order ) , third - order convex eno @xcite , parabolic reconstructions ( as in * ? ? ? * ) , or the 5th order finite difference weno scheme of @xcite ( only for the hydrodynamics equations ) .      as already anticipated , computation of the numerical flux function @xmath82 at a zone edge ( @xmath83 ) requires the solution @xmath84 , for @xmath85 , to the initial value problem @xmath86 complemented with the one - dimensional evolutionary equation for @xmath1 . since this section deals with interface quantities , we shall omit , in this section only , the @xmath51 subscripts .
the exact solution to the riemann problem ( [ eq : riemann ] ) involves the decay of a set of non - linear waves and can be a rather cumbersome task to achieve . with the exception of few simple cases ,
existing riemann solvers routinely involved in upwind schemes are based on different levels of approximation .
the lax - friedrichs rusanov flux is robust , but also the most diffusive solver and is available for all modules .
it computes the fluxes according to : @xmath87 \,,\ ] ] where @xmath88 is the projection of the tensor flux on the @xmath89 unit vector , @xmath90 is kronecker - delta symbol and @xmath91 is the largest local signal velocity .
a somewhat different approximation comes from the hll - family solvers : @xmath92 where the solution to the riemann problem is approximated by @xmath93 waves with @xmath94 and @xmath95 and separated by @xmath96 states .
the @xmath97 are computed from a suitable  parameterization " of the rankine - hugoniot jump conditions across each wave : @xmath98 with @xmath99 .
the hll and hllc solvers can be consistently derived following this recipe with @xmath100 and @xmath101 , respectively , see @xcite , @xcite for the hydro equations , @xcite for the mhd equations , @xcite for the relativistic equations .
similarly , we have also implemented the multi - state ( @xmath102 ) hlld solver of @xcite in the mhd module .
the hll approach has some attractive features in that it guarantees positivity of pressure and , in the case of relativistic flows , it preserves the condition @xmath103 .
linearized riemann solvers are more accurate since the averaging process inherent to eq .
( [ eq : tvdlf ] ) or ( [ eq : hll ] ) is removed and all jumps are computed by linearization around some average state .
the roe solver computes the numerical fluxes according to : @xmath104 \,,\ ] ] where the rows ( columns ) of @xmath105 ( @xmath106 ) are the left ( right ) eigenvectors of the jacobian @xmath107
.    the advection upstream splitting method ( ausm , originally proposed * ? ? ?
* ) provides an alternative and efficient upwinding strategy by splitting the flux into convective and pressure terms , respectively associated with linear and nonlinear fields : @xmath108 where @xmath109 is a suitably defined convective velocity and the @xmath110 flux is governed by the acoustic speed .
the original ausm scheme has been substantially improved in the work of @xcite and @xcite .
the most accurate approach consists in directly solving the whole set of rankine - hugoniot jump conditions to find @xmath111 , from which the flux can be computed , @xmath112 however , this approach is computationally expensive since it generally involves the solution of highly nonlinear equations .
different physics modules come with different sets of riemann solvers , and additional methods of solution may be easily accommodated .
we warn that more accurate riemann solvers ( such linearized or exact schemes ) may introduce insufficient numerical dissipation for certain flow configurations . sporadically
, this could lead to a number of numerical pathologies such as the carbuncle phenomena , odd - even coupling or lack of positivity - preserving properties .
see the work by @xcite for a comprehensive review .
time marching algorithms provide a general ( i.e. physics - independent ) framework for the discretization of the left hand side of eq ( [ eq : cl ] ) .
for example , in the simplest case of forward euler discretization one has @xmath113 where @xmath114 is the right hand side operator ( [ eq : rhs ] ) or a sum of them for dimensionally split or unsplit schemes , respectively .
the time step @xmath115 is limited by the courant - friedrichs - lewy ( cfl , * ? ? ?
* ) condition : @xmath116 with @xmath117 and @xmath118 being , respectively , the smallest cell length and largest signal velocity in the @xmath57 direction . @xmath119 identifies the courant number , restricted by the conditions given in the last column of table [ tab : nriem ] .
pluto provides a number of time - marching schemes for the explicit numerical integration of the conservation law ( [ eq : cl ] ) .
we discriminate between 1 ) fully discrete , zone - edge extrapolated and 2 ) semi - discrete methods . evolution in more than one dimension may be achieved by either operator splitting @xcite or fully multidimensional integration .
lcccc mh ( s ) & 1 & 2 & 3 & 1 + mh ( u ) & - & 4 & 12 & 1 + chtr ( s ) & 1 & 2 & 3 & 1 + chtr ( u ) & - & 4 & 12 & 1 + rk2 ( s ) & 2 & 4 & 6 & @xmath26 + rk2 ( u ) & 3 & 6 & 9 & @xmath120 + rk3 ( s ) & 2 & 4 & 6 & @xmath26 + rk3 ( u ) & 3 & 6 & 9 & @xmath120      zone - edge extrapolated methods achieve second order temporal accuracy by midpoint in time quadrature : @xmath121 and thus are based on a single - step . for directional splitting methods one has @xmath122 , whereas @xmath123 in the case of a dimensionally unsplit method .
the input states for the riemann solver are computed by taylor expansion of the primitive variables at half time step , @xmath124 where @xmath125 is the matrix of the quasi - linear form of the equations and @xmath126 is the identity matrix .
an alternative form which does not require the primitive form of the equations can be written in terms of conservative variables .
both variants yield the well - known muscl - hancock scheme ( mh henceforth , * ? ? ?
* ; * ? ? ?
when eigenvalues and eigenvectors are available , upwind limiting may be used to select only those characteristics which contribute to the effective left and right states .
this approach is employed , for instance , in the original ppm advection scheme of @xcite and we will refer to as characteristic tracing ( chtr henceforth ) .
these methods require boundary conditions to be assigned at the beginning of the time step only .
the advantage offered by dimensionally split single - step algorithms is the lower computational cost ( only one riemann solver per cell per direction is required , see tab [ tab : nriem ] ) and storage requirement .
an alternative , dimensionally unsplit version of these schemes , however , adopts the corner transport upwind ( ctu ) method of @xcite , @xcite and is more expensive . in this case , an extra correction term is needed in eq .
( [ eq : states ] ) ; in two dimensions , for example , the input states for the riemann problem are modified to @xmath127 with @xmath128 being the right - hand side operator corresponding to the transverse direction .
as in the dimensionally split case , the cfl stability condition is not affected by the dimensionality of the problem ( i.e. @xmath129 , see also tab [ tab : nriem ] ) .
contrary to its dimensionally split version , on the other hand , this method is computationally more expensive since 4 instead of 2 ( in 2d ) and 12 instead of 3 ( in 3d ) riemann problems must be solved at each interface , see table [ tab : nriem ] .
semi - discrete methods are based on the classical method of lines , where the spatial discretization is considered separately from the temporal evolution which is left continuous in time . in this framework
( [ eq : cl ] ) is discretized as a regular ode .
pluto implements the @xmath130 and @xmath131 order total variation diminishing ( tvd ) runge - kutta schemes of @xcite .
the second - order method ( rk2 ) advances the system of conservation law ( [ eq : cl ] ) as @xmath132 @xmath133   \,,\ ] ] with @xmath134 or @xmath135 in the case of a dimensionally split or unsplit method , respectively .
the third - order runge - kutta method ( rk3 ) may also be used , at the cost of an additional step : @xmath136 @xmath137   \,,\ ] ] @xmath138\,.\ ] ] for this class of methods , input states for the riemann solver are given by the output of the interpolation routine , see  [ sec : recon ] . besides , boundary conditions must be assigned before each step .
a total of two and three riemann problems per cell per direction must be solved by the rk2 and rk3 marching scheme , respectively .
furthermore , fully unsplit runge - kutta integrators require a stronger time step limitation , see table [ tab : nriem ] .
pluto is distributed with four independent physics modules for the explicit numerical integration of the fluid equations under different regimes and conditions . the hydrodynamics ( hd ) , magnetohydrodynamics ( mhd ) , relativistic ( rhd ) , and relativistic mhd ( rmhd )
modules solve , respectively , the euler equations of gas dynamics , the ideal / resistive mhd equations the energy - momentum conservation laws of a special relativistic perfect gas , and the equations for a ( special ) relativistic magnetized ideal plasma .    in what follows , @xmath139 , @xmath140 , and @xmath141 will denote , respectively , the proper density , thermal pressure and total energy density .
vector fields such as @xmath142 , @xmath143 , @xmath144 , define the momentum density , velocity and magnetic field .
finally , @xmath145 will be used to define the ratio of specific heats for the ideal equation of state .
this module implements the equations of classical fluid dynamics with an ideal equation of state .
the conservative variables @xmath1 and the flux tensor are : @xmath146 where @xmath147 is the momentum density and @xmath126 is the unit , @xmath148 tensor .
the total energy density @xmath141 is related to the gas pressure @xmath140 by the ideal gas closure : @xmath149 the set of primitive variables @xmath150 is given by density , velocity @xmath151 and thermal pressure @xmath140 .
this module comes with a set of several riemann solvers , including the nonlinear riemann solver based on the two - shock approximations @xcite , the roe solver @xcite , the ausm+ scheme @xcite , the hll @xcite , hllc @xcite solvers and the lax - friedrichs solver @xcite .
the hd module contains an implementation of the fast eulerian transport algorithm for differentially rotating disk ( fargo , * ? ? ?
* ) on polar grids .
the fargo scheme allows much larger time steps than the standard integration where the courant condition is traditionally limited by the fast orbital motion at the inner boundary .      the mhd module deals with the equations of classical ideal or resistive magnetohydrodynamics ( mhd ) .
in the ideal case , @xmath1 and @xmath152 may be written as @xmath153 with @xmath147 and @xmath154 being the total ( thermal + magnetic ) pressure , respectively .
the additional constraint @xmath155 complements the magnetic field evolution ( see  [ sec : divb ] ) .
resistivity is introduced by adding appropriate parabolic terms to the induction and energy equations , see  [ sec : diffusion ] .
available equations of state implemented are the ideal gas law , @xmath156 and the isothermal equation of state @xmath157 where @xmath158 is the ( constant ) isothermal speed of sound .
the set of primitive variables is the same one used for the hd module , with the addition of magnetic fields .
the user can choose among the following available riemann solvers : the roe solver of @xcite , the hll @xcite , hllc @xcite , hlld @xcite and the lax - friedrichs solvers .
the solution to the mhd equations must fulfill the solenoidal constraint , @xmath155 , at all times .
unfortunately it is well known that numerical scheme do not naturally preserve this condition unless special discretization techniques are used . among the variety of monopole control strategies proposed in literature ( for a review see * ? ? ?
* ) , we have implemented 1 ) the eight wave formulation @xcite and 2 ) the constrained transport ( ct henceforth ) of @xcite , and @xcite .
the ct framework has been incorporated into the unsplit ctu integrator following the recent work by @xcite .
a similar approach is used by @xcite .    in the first strategy ,
the magnetic field has a cell centered representation and an additional source term is added to the mhd equation .
the discretization of the source term is different depending on the riemann solver ( following * ? ? ?
* ) , a feature which we found to greatly improve robustness .    in the ct formulation , on the other hand
, the induction equation is integrated directly using stoke s theorem and the magnetic field has a staggered collocation .
this module deals with the motion of an ideal fluid in special relativity .
the equations are given by particle number conservation and energy - momentum conservation @xcite .
conservative variables and tensor flux are : @xmath159 where @xmath160 is the laboratory density and @xmath161 is the lorentz factor . for convenience ,
velocities are normalized to the the speed of light .
the relation between conserved and primitive variables @xmath162 is more involved than its classical counterpart .
specifically we have @xmath163 where the specific enthalpy @xmath164 depends on the equation of state .
the inverse map requires the solution of a nonlinear equation . @xcite
address this topic for different choices of @xmath165 .
two equations of state are available for this module : the constant-@xmath145 ideal gas law @xmath166 with @xmath167 and the equation of state ( tm henceforth ) already introduced in @xcite : @xmath168 which satisfies taub s inequality @xcite and approximates ( within @xmath169 ) the single - specie relativistic perfect gas ( for a thorough discussion , see * ? ? ?
* ; * ? ? ?
* and references therein ) .    the two shock nonlinear riemann solver described in @xcite has been incorporated into the set of available riemann solvers , together with the recently developed hllc algorithm by @xcite .
the hll and lax - friedrichs riemann solvers have also been coded .
the motion of an ideal relativistic magnetized fluid is described by conservation of mass , energy - momentum , and by maxwell s equations , see , for example , @xcite .
pluto implements the equation of special relativistic magnetohydrodynamics where the vector of conservative variables and respective fluxes can be cast as @xmath170 where @xmath171 , @xmath172 , @xmath173 and @xmath174 is the total ( thermal + magnetic ) pressure .
the components of @xmath1 are related to the primitive variables @xmath175 through @xmath176 the inverse map is highly nonlinear and different methods of solution have been proposed when a constant @xmath145 law is adopted ( for a recent review , see * ? ? ?
* ) . in pluto ,
we follow the approach described in @xcite which was recently generalized to include the tm equation of state described in  [ sec : rhd ] .
the interested reader should also refer to the work by @xcite .
the rmhd module may be used with the lax - friedrichs , hll or the recently developed hllc riemann solver , see @xcite .
since the induction equation takes the same form as in the classical case , the divergence of the magnetic field can be kept under control by any of the methods already introduced in the mhd module , see  [ sec : divb ] .
in addition to the homogeneous terms previously described , a number of additional features may be added in the code .
local source terms are functions of the variables themselves but not of their derivatives and are included either during the advection step or via operator splitting .
examples include the centripetal and coriolis terms implicitly arising when working in polar or spherical coordinates , external forces ( e.g. gravity ) or optically thin radiative losses .
non - ideal effects such as viscosity , resistivity and thermal conduction , on the other hand , introduce parabolic corrections to the equations and involve the solution of diffusion equations .
the divergence of a rank-2 tensor in curvilinear coordinates breaks down the homogeneous properties of eq .
( [ eq : cl ] ) .
this loss of conservation comes from the additional source terms inevitably introduced by those unit vectors that do not have fixed orientation in space ( see , for instance , the appendix in * ? ? ?
* ) . in the case of symmetric or anti - symmetric tensors ,
however , some of the source terms can be eliminated by properly re - arranging the derivatives .
this ensures conservation of the angular momenta rather than the linear ones .    for all physics modules previously introduced , for example , the components of the flux tensor in the momentum equation form a @xmath148 rank 2 symmetric tensor @xmath177 , where @xmath140 is the isotropic pressure term .
however , since @xmath178 , the differencing terms involving pressure are separately treated as gradient components and never contribute to the source terms .
the symmetric character of @xmath179 leads to further simplifications in polar coordinates , since the @xmath10-component of the divergence of @xmath179 may be written as @xmath180 this leads to the so - called  angular momentum - conserving form " where the radial contribution to @xmath56 is computed by the new operator @xmath181 } =     -\frac{1}{r\delta{{\mathcal v}}^r}\left(r^2_+ f^r_{+,[m_\phi ] } - r^2_-f^r_{-,[m_\phi]}\right)\,,\ ] ] thus leaving the radial component of momentum as the only non - homogeneous equation , with @xmath182 } = m_{\phi\phi}/r$ ] .
similar considerations lead to the angular momentum conserving form in spherical geometry .
geometrical source terms are integrated explicitly during the advection step by adding their contribution to the right hand side operator ( [ eq : rhs ] ) . in the semi - discrete approach , this is straightforward . for edge - extrapolated methods ,
this requires 1 ) augmenting ( [ eq : states ] ) with the cell - center source term for a half step and then 2 ) averaging the resulting time centered left and right edge values to compute the @xmath183 for the final conservative step .      for many astrophysical applications , radiative processes may become important during the evolution .
this is particularly true when the cooling timescale becomes comparable to , or smaller than the typical timescale for the dynamical evolution .
optically thin radiative losses are treated as local source terms depending on the temperature , density and an arbitrary number of ions of different elements ( e.g. h , he , c , n , o , and so on ) .
the ionization fractions are advected with the fluid and are subject to collisional ionization , recombination and charge exchange processes .
currently , we have implemented a cooling module @xcite similar to the one coded by @xcite , extending the temperature range of applicability ( @xmath184 k ) by using an increased number of ion species .
this module employs @xmath185 ions and is valid for densities up to @xmath186 @xmath187 .
operator splitting is employed to evolve the chemical network in time .
a @xmath188 order fully implicit scheme is adopted in regions of rapid variations , whereas a second order explicit integrator is used otherwise .
a comprehensive description is outside the goal of this work and will be available in future works .
parabolic terms introduce second - order spatial derivatives and their treatment requires the solution of diffusion equations .
typical examples include electric resistivity , @xmath189 & = &   0       \,,\end{aligned}\ ] ] where @xmath190 is the current and @xmath191 is the resistivity ; or thermal conduction , @xmath192 where @xmath193 is the energy advection flux and @xmath194 is the thermal conductivity coefficient .
these terms may be included into the original conservation law with the further time step limitation @xmath195 , where @xmath196 is the advective time step ( eq . [ eq : cfl ] ) and @xmath197\,.\ ] ] is the diffusion step . here
@xmath198 characterizes the physical process , e.g. , @xmath191 or @xmath194 .    for advection - dominated problems ( i.e. @xmath199 ) , eq .
( [ eq : diff_timestep ] ) does not pose severe restrictions and diffusion terms can be treated explicitly .
we achieve this by adding centered in space , second - order finite difference approximations to the right hand side operator @xmath200 , see eq .
( [ eq : rhs ] ) .
however , for diffusion - dominated problems and/or increasingly high resolution simulations , @xmath201 will eventually drop below the typical advection scale . in such situations
the explicit integration can be considerably accelerated using the super time stepping ( sts ) method @xcite . in sts , diffusion terms
are included via operator splitting , and the solution vector is evolved over a super time step @xmath202 consisting of @xmath93 smaller sub - steps , the stability of which is closely related to the properties of chebyshev polynomials .
it can be proved @xcite that @xmath203 which makes sts almost @xmath93 times faster than the standard explicit scheme .
thus , if @xmath202 is taken to be the advective time step , sts will require ( approximately ) @xmath204 iterations rather than @xmath205 , typical of a normal sub - cycling explicit time stepping .
this approach offers dramatic ease of implementation over implicit schemes .
resistivity has been extensively tested through the direct comparison with analytical solutions of linear diffusion problems of magnetic field .
our results confirm the efficiency and accuracy of the sts approach already highlighted by previous investigators .
this has encouraged further experiments towards nonlinear problems ( e.g. spitzer - like conductivity ) , where preliminary results suggest that the sts methodology may be succesfully applied .
this issue will be presented in future works .
lcccccccc double mach reflection([sec : hd_dmr ] ) & hd & ( a ) & cartesian & 2 & parabolic & hllc & rk3 ( s ) & 0.8 + & & ( b ) & & & ceno3 & hllc & rk3 ( s ) & 0.8 + & & ( c ) & & & weno5 & roe f - s & rk3 ( s ) & 0.8 + & & ( d ) & & & parabolic & two - shock & chtr ( s ) & 0.8 + & & ( e ) & & & linear & roe & mh ( u ) & 0.8 + & & ( f ) & & & linear & hll & mh ( u ) & 0.8 + under - expanded jet (  [ sec : hd_jet ] ) & hd & ( a ) & cylindrical & 2 & linear & ausm+ & mh ( u ) & 0.4 + & & ( b ) & & & ceno3 & hll & rk3 ( s ) & 0.4 + rotated shock tube (  [ sec : mhd_st2.5 ] ) & mhd & ( a ) & cartesian & 2.5 & linear & roe & rk2 ( u ) & 0.4 + & & ( b ) & & & linear & hlld & rk2 ( u ) & 0.4 + & & ( c ) & & & linear & hll & rk2 ( u ) & 0.4 + fast rotor (  [ sec : mhd_rotor ] ) & mhd & ( a ) & cartesian & 2 & parabolic & hllc & chtr ( u ) & 0.6 + & & ( b ) & polar & & linear & roe & rk3 ( u ) & 0.4 + magnetized torus (  [ sec : mhd_torus ] ) & mhd & ( a ) & spherical & 2.5 & linear & hlld & rk2 ( u ) & 0.4 + & & ( b ) & spherical & & parabolic & hll & rk3 ( u ) & 0.4 + & & ( c ) & cylindrical & & linear & hlld & rk2 ( u ) & 0.4 + & & ( d ) & cylindrical & & parabolic & hll & rk3 ( u ) & 0.4 + spherical shock tube (  [ sec : mhd_torus ] ) & rhd & ( a ) & spherical & 1 & parabolic & two - shock & chtr(s ) & 0.8 + & & ( b ) & spherical & 1 & linear & hll & mh ( s ) & 0.8 + & & ( c ) & cartesian & 3 & linear & hllc & chtr(s ) & 0.8 + magnetized blast wave (  [ sec : rmhd_blast3d ] ) & rmhd & ( a ) & cartesian & 3 & linear & hll & rk2 ( u ) & 0.2 + & & ( b ) & cylindrical & 2 & linear & hll & mh ( u ) & 0.4    pluto has been validated against several benchmarks typically adopted for other numerical schemes .
several algorithms for relativistic flows presented in @xcite and @xcite are now part of the code and the related verification problems will not be repeated here . in what follows ,
we propose additional tests aimed to check the code performances on problems of different nature , geometry and dimension .
computational details for each test are given in table [ tab : tests ] .
the initial condition for this test problem @xcite consists in a planar shock front making an angle @xmath206 with a reflecting wall , taken to be the @xmath6 axis : @xmath207 where @xmath208 is the shock coordinate .
the ideal equation of state with @xmath209 is used throughout the calculation .
the computational domain is the rectangle @xmath210\times[0,1]$ ] covered with a uniform grid with @xmath211 .
outflow boundary conditions apply at @xmath212 and reflective conditions are imposed at the bottom boundary @xmath213 for @xmath214 .
fluid variables are kept constant to their initial values at @xmath213 for @xmath215 and at the leftmost boundary @xmath216 . at the top boundary
@xmath217 the exact motion of the shock is prescribed .
we carry out integration until @xmath218 using the six different combinations of algorithms described in table [ tab : tests ] .
panels in the left column of fig .
[ fig : hd_dmr ] show , from top to bottom , the results obtained with high order ( @xmath219 ) interpolants : piecewise parabolic reconstruction ( a ) , @xmath220 order central eno ( b ) and the weno scheme of @xcite ( c ) . panels on the right show the original ppm scheme of @xcite ( case d , top ) , the @xmath188 order unsplit muscl - hancock with a roe solver ( case e , middle ) and with the hll solver ( case f , bottom ) .    after the reflection ,
a complicated flow structure develops with two curved reflected shocks propagating at directions almost orthogonal to each other and a tangential discontinuity separating them . at the wall ,
a pressure gradient sets up a denser fluid jet propagating along the wall .
kelvin - helmholtz instability patterns may be identified with the  rolls " developing at the slip line .
this feature is visible only for some of the selected schemes .
indeed , the use of high - order interpolants , such as ppm ( a , d ) or weno(c ) , and the ability of the riemann solvers to resolve contact and shear waves result in smaller numerical viscosity when compared to a second - order slope - limited reconstruction and/or a more approximate riemann solver . in this
respect , case a ) shows the smallest amount of dissipation , whereas the hll solver ( f , bottom right ) has the largest numerical diffusion .    in terms of cpu time
, we found that case a ) to f ) followed the ratios @xmath221 , that is , with the @xmath222 order weno schemes being by far the most expensive ( more than a factor of @xmath223 compared to the simple hll ) and the original ppm ( split ) scheme being the fastest . in doing the comparison
, however , one has to bear in mind that the amount of computing time depends , in the first place , by the number of riemann problems solved in each zone at each time step , as shown in table [ tab : nriem ] .
this number is 6 for cases a ) , b ) and c ) , but @xmath224 for case e ) and f ) ( which are dimensionally unsplit ) and only @xmath225 for the original dimensionally split ppm scheme , case d ) . thus one can safely conclude , comparing case e ) and f ) , that the roe solver is by a factor @xmath226 slower than hll or , by comparing a ) , b ) and c ) , that the ceno and ppm are considerably faster than weno , although the combinations of algorithms in a ) better resolves small scale structures .
finally , we note that computations carried with more accurate schemes ( with the exception of the @xmath222 order weno ) exhibit a slight tendency to form a spurious  kinked " mach stem on the @xmath6 axis .
this feature is engendered by a numerical flaw @xcite caused by insufficient numerical dissipation and it becomes particularly dramatic when the resolution is further increased .
code validation , in addition to the typical tests described above , can be carried out against laboratory experiments of under - expanded free jets as well .
this kind of experiments consists of injecting , through a converging nozzle , a gas at stagnation pressure @xmath227 into a chamber kept at lower pressure @xmath228 .
the shock structure that forms is typically axially symmetric and consists of a quasi - stationary mach - disk , located at a distance @xmath229 from the nozzle , and of a barrel and reflected shocks @xcite .
after series of experiments with different gases , an empirical expression was found @xcite that relates the mach - disk location @xmath229 with the pressure ratio @xcite : @xmath230 with @xmath231 the effective sonic nozzle radius .
furthermore , @xcite obtained for the mach number @xmath232 on the jet axis the following empirical expression : @xmath233^{-\frac{\gamma-1}{4 } } \left ( \frac{\gamma+1}{\gamma-1 } \right)^{\frac{\gamma+1}{4 } }   \left ( \frac{z}{2r^ * } \right)^{\gamma-1 } \,.\ ] ]    we have carried out 2d numerical simulations in cylindrical coordinates on a uniform grid @xmath234 $ ] , @xmath235 $ ] with @xmath236 zones per beam radius .
the grid has been further extended in both directions ( up to @xmath237 and @xmath238 ) by adding a second patch of geometrically stretched zones ( @xmath239 and @xmath240 zones in @xmath7 and @xmath13 , respectively ) in order to avoid spurious reflections at the boundaries .
free outflow is set at the outer boundaries and reflective conditions are imposed on the axis @xmath241 and for @xmath242 at @xmath243 .
considering the actual nozzle as the injection zone at @xmath243 , @xmath244 , we have obtained the values of the pressure @xmath245 and density @xmath246 by employing the isentropic laws for a perfect gas @xcite for a converging nozzle with stagnation pressure @xmath227 and density @xmath247 : @xmath248 we choose @xmath249 and @xmath250 ( typical of an argon jet in helium at ambient temperature ) and accordingly choose a sonic injection velocity at the the nozzle ( @xmath251 ) .
densities , velocities and lengths are normalized to the ambient @xmath139 , sound speed and beam radius , respectively .    fig .
[ fig : hdjet_a ] shows the density maps for the two selected numerical schemes ( see table [ tab : tests ] ) at @xmath252 .
the results obtained with the ausm+ riemann solver ( scheme a ) disclose a somewhat greater amount of small scale structure than the hll integration ( scheme b ) .
this is not surprising because of the former s ability to properly capture contact and shear waves . on the contrary ,
the latter greatly simplifies the wave pattern of the riemann fan at the cost of introducing extra numerical dissipation .
this is compensated , to some level , by the choice of the @xmath220 order interpolant ( ceno3 ) which , nevertheless , is better combined with an equally accurate time marching scheme ( rk3 ) . the overall balance , therefore , favors the second order scheme since only @xmath224 riemann problems must be solved instead of the @xmath253 required by rk3 , see table [ tab : nriem ] .
this conclusion is supported not only by the decreased numerical viscosity inherent to scheme a ) , but also by the reduced computational cost , which sees scheme b ) being @xmath254 times slower than scheme a ) .    in both cases
we see that the mach number profiles plotted in fig [ fig : hdjet_b ] exhibit an excellent agreement with the empirical relation ( [ eq : knuth ] ) .
it should be emphasized that the saturated position of the mach disk oscillates around the experimental value , eq .
( [ eq : young ] ) , by a few percents .
the oscillations are caused by disturbances originated at the intersection between the mach disk and the barrel shock surrounding the jet .
this test sets up a riemann problem between left and right states given , respectively , by @xmath255 where parallel ( @xmath256 ) and perpendicular ( @xmath257 ) components refer to the direction of structure propagation .
the ratio of specific heats is @xmath258 .
the line @xmath259 ( corresponding to a rotation angle of @xmath260 with respect to the y - axis ) is chosen as the surface of discontinuity separating the two constant states and the computational domain @xmath261\times[0,1/n_{\mathrm{x}}]$ ] is discretized with @xmath262 zones , as in @xcite .
this setup yields a mesh spacing ratio @xmath263 thus ensuring that the initial magnetic field is divergence - free ( ct is used to advect magnetic fields ) . at the boundaries in the @xmath9 direction we impose translational invariance by applying shifted boundary condition , i.e. , for any pair of indexes @xmath264 spanning the ghost zones , we set @xmath265 at the lower @xmath9-boundary and @xmath266 at the upper @xmath9-boundary .
the structure involves three - dimensional vector fields and the outcoming wave pattern is bounded by two fast shocks ( located @xmath267 and @xmath268 ) enclosing two rotational discontinuities ( visible only in the magnetic field ) , two slow shocks and one contact wave in at @xmath269 .
[ fig : mhd_st2.5 ] shows a cut along the @xmath6 axis at @xmath270 together with the high - resolution reference solution ( solid line ) computed from a one - dimensional integration at @xmath271 . the second order unsplit runge - kutta method with a cfl number of @xmath272 together with @xmath188 order linear interpolation on primitive variabels and the riemann solver of roe were used for integration .
computations were repeated at different resolutions starting from @xmath273 ( lowest ) up to @xmath274 ( highest ) , by doubling the number of zones each time .
the performances and accuracies of the roe , hlld and hll riemann solvers were compared in terms of errors ( in @xmath275 norm ) and cpu time , as shown in fig [ fig : mhd_st2.5_error ] . as indicated , hlld and roe yields comparable errors ( @xmath276 and @xmath277 at the highest resolution ) , whereas the hll solver results in errors which are @xmath278 larger . in terms of cpu time ,
the hlld solver is considerably faster than the roe scheme and this is reflected in the right panel of fig [ fig : mhd_st2.5_error ] .
indeed , for a given accuracy , the computing time offered by hlld significantly improves over the roe solver and it is still slightly better than the cheaper hll scheme . in this sense , hlld offers the best trade off between accuracy and efficiency .    a caveat : the previous considerations hold , strictly speaking , for the particular combinations of algorithms applied to the problem in question and
should not be trusted as general statements .
one may find , for example , that if interpolation is carried on characteristic variables ( instead of primitive ) the overall trend which favours hll over roe ( in terms of cpu time ) is reversed .
still , our results illustrate how the choice of an algorithm or another may considerably bear upon important issues of accuracy and efficiency .
a rapidly spinning ( @xmath279 ) cylinder with higher density is embedded in a static background medium with uniform pressure ( @xmath280 ) , threaded by a constant magnetic field ( @xmath281 ) .
hydrodynamical variables smoothly change their values between the disk and the external environment using a taper function : @xmath282 the disk has radius @xmath283 and the taper function @xmath284 terminates at @xmath285 .
the initial radial velocity is zero everywhere and the adiabatic index is @xmath209 .
this problem has been considered by several authors , see for example @xcite , and references therein .    because of the geometrical setting , we have setup the problem in both cartesian and polar coordinates . on the cartesian grid ,
the domain is the square @xmath286 ^ 2 $ ] with outflow boundary conditions applied everywhere . on the polar grid ,
we choose @xmath287 , @xmath288 with periodic boundary conditions in @xmath10 and zero - gradient at the outer radial boundary . at the inner boundary we set @xmath289 . for each geometry , we adopt the combination of algorithms listed in table [ tab : tests ] and compare two different strategies to control the solenoidal constraint @xmath155 , i.e. , the ct and powell s methods .
[ fig : mhd_rotor ] shows density and magnetic pressure contours computed at @xmath290 on the cartesian and polar grids at a resolution of @xmath291 zones .
as the disk rotates , strong torsional alfvn waves form and propagate outward carrying angular momentum from the disk to the ambient .
our results fully agree with those previously recovered by the above - mentioned authors and computations obtained with the ct and powell s scheme shows excellent agreement . despite the higher complexity of the ct scheme where both staggered and zone - centered magnetic field are evolved in time , the computational cost turned out to be comparable ( ct / powell @xmath292 ) for each system of coordinates .
moreover , the solutions computed in the two different geometries show nearly identical patterns , although polar coordinates ( even with their intrinsically higher numerical viscosity at higher radii , due to the diverging nature of the grid ) better fit the geometrical configuration of the problem .
however , computations carried out on the polar grid were @xmath293 times slower than the cartesian one , because of the more severe time step limitation at the inner boundary , where the grid narrows .
these considerations can considerably affect the choice of geometry , specially in long - lived simulations .
we now discuss an application of the code to a problem of astrophysical interest , along the lines of @xcite .
the problem involves a magnetized , constant angular momentum ( @xmath294 ) torus in a ( properly normalized ) pseudo - newtonian gravitational potential , @xmath295 .
the torus has an equilibrium configuration described by the integral relation @xmath296 here @xmath297 is determined by the radial location of the inner edge of the torus ( @xmath298 in our case ) and @xmath299 is the keplerian specific angular momentum at the pressure maximum ( @xmath300 ) where the orbital period is @xmath301 .
density and pressure are tied by the polytropic relation @xmath302 , with @xmath258 .
a poloidal magnetic field is initialized inside the torus using the @xmath10 component of the potential vector @xmath303 , normalized by the condition @xmath304 .
we solve the problem in spherical as well as cylindrical coordinates .
the spherical grid used for the problem is @xmath305 and @xmath306 , with @xmath307 uniform zones covering the region @xmath308 and @xmath309 .
the remaining regions were covered by a geometrically stretched grid with @xmath310 zones .
outflow boundaries are imposed at the innermost and outermost radii , whereas axisymmetry holds at @xmath311 and @xmath312 . in cylindrical coordinates ,
the computational box is @xmath313 and @xmath314 , with a uniform grid @xmath315 in the region @xmath308 and @xmath316 .
axisymmetry boundary conditions are imposed at the axis , while all the rest are set to outflow .
in addition , each case is further investigated by adopting 1 ) the hlld solver with second order slope limited reconstruction -case a and c in table [ tab : tests]- and 2 ) the hll solver combined with piecewise parabolic reconstruction ( case b and d in table [ tab : tests ] ) .
second and third order runge kutta schemes are used for integration , respectively .
figure [ fig : mhd_torus ] shows the density logarithm at @xmath317 for the four cases respectively .
initially , the strong shear generates a toroidal magnetic field component leading to a pressure - driven expansion of the torus and accretion takes place at @xmath318 .
the growth of the poloidal field develops into a highly turbulent regime accounted for by the magneto rotational instability ( mri , * ? ? ?
* ) at @xmath319 .
the effect is a net transport and redistribution of angular momentum .    even though linear reconstruction presumably introduces more diffusion than parabolic interpolation , the hlld solver , being more accurate , results in computations with a higher level of fine structure ( compared to hll ) around the tori during the turbulent phase . besides , by normalizing the cpu time to case c ) , we found the ratio a : b and c : d to be @xmath320 ( in cylindrical coordinates ) and @xmath321 ( in spherical coordinates ) , respectively . indeed , since higher than @xmath188 order interpolants are computationally more expensive and are used in conjunction with @xmath220 order time accurate schemes , the hll integration comes at an extra computational cost .
this suggests that the use of a more accurate riemann solver can balance the lower order of reconstruction in space and result , at the same time , in more efficient computations . moreover , note that the equatorial symmetry breaks down more rapidly when parabolic reconstruction is employed , but it is retained to a higher level for the @xmath188 order case
this is likely due to the larger number of operations introduced by the ppm reconstruction step , inevitably leading to faster - growing round off errors .
finally we note that computations in spherical geometry suffer from the major drawbacks of introducing excessive numerical viscosity at the outer radii and to severely limiting the time step at the inner boundary .
both aspects are indeed confirmed in our numerical tests . on the other hand ,
a cylindrical system of coordinate does not experience a similar behavior and thus a higher turbulence level is still observed at larger radii .
an initial spherical discontinuity separates a high pressure region ( @xmath322 for @xmath323 ) from a uniform medium with @xmath324 ( for @xmath325 ) .
the density is set to unity everywhere and the gas is initially static .
computations proceed by investigating the influence of two different equations of state ( eos ) , the constant @xmath145 law with @xmath326 ( eq . [ eq : rhd_ideal ] ) and the tm equation ( [ eq : rhd_tm ] ) .
moreover , we compare the performances of the ppm scheme ( with the two - shock riemann solver ) with the simpler mh ( with the hll solver ) which avoids characteristic decomposition of the equations ( schemes a and b in table [ tab : tests ] ) .
spherical symmetry is assumed in the one - dimensional calculation .    the ensuing wave pattern ( solid line in fig [ fig : rhd_sph ] )
is comprised of a left rarefaction wave , a contact discontinuity in the middle and a right going shock .
the overall morphology is significantly affected by the choice of the eos . indeed ,
when the more realistic eos is adopted , waves propagate at smaller velocities and this is particularly evident at the head and the tail points of the left - going rarefaction wave .
this results in a stronger adiabatic expansion for the constant @xmath145 gas and in a denser shell between the shock and the trailing contact wave for the tm eos .
[ fig : rhd_sph_error ] reports the @xmath275 norm errors ( for density ) and the normalized cpu time as functions of the resolution @xmath327 ( @xmath328 ) for both schemes and for the selected equations of state .
errors are computed against a reference solution of @xmath329 zones .
the cheaper scheme b ) is certainly faster , although almost twice the resolution should be employed to achieve comparable accuracy with scheme a ) .
the opposite trend is found for the ppm scheme which is slower by almost a factor of @xmath225 when compared to mh / hll .
employment of the tm eos results in an additional computational cost of about @xmath330 independently of the riemann solver . however , the simple results obtained here suggest that a more realistic eos can significantly impact the solution and thus justify the direct use of eq .
( [ eq : rhd_tm ] ) instead of ( [ eq : rhd_ideal ] ) .
further reading on this topic , together with its extension to rmhd , may be found in @xcite .
spherically symmetric problems can serve as useful verification benchmarks to tests the code performance on three dimensional cartesian grids .
for this purpose , we use the second - order chtr scheme with the recently developed hllc riemann solver @xcite ( scheme c ) and adopt a resolution of @xmath331 computational zones . by exploiting the symmetry ,
computations are carried out on one octant ( @xmath261 ^ 3 $ ] ) only by adopting reflecting boundary conditions .
results are over - plotted using symbols in fig .
[ fig : rhd_sph ] . small propagation structures such as the thin density shell pose serious computational challenges .
indeed we see that the maximum density peaks achieve @xmath332 and @xmath333 of the reference values for @xmath326 and the tm equation of state , respectively .
the smooth rarefaction wave is correctly captured at constant entropy with very small overshoots at the back .
results at higher resolution ( not shown here ) show increasingly better agreement .
scaling performances have been tested for this problem on different parallel platforms , all yielding satisfactory scaling properties .
[ fig : scaling ] shows , for instance , the normalized execution time on the ibm sp cluster 1600 p5 - 575 with @xmath334 processors ( @xmath335 ) for the same problem at a resolution of @xmath331 , indicating an almost ideal scaling ( @xmath336 ) .      a spherical region with density @xmath337 and thermal pressure @xmath280
is embedded in a static uniform medium with @xmath338 and @xmath339 .
the sphere is centered around the origin and has radius @xmath340 .
a linear smoothing function is applied for @xmath341 .
the whole region is threaded by a constant vertical magnetic field in the @xmath13 direction , @xmath342 .
the ideal equation of state with specific heat ratio @xmath343 is used .
a similar setup in two dimensional planar geometry was earlier considered by @xcite .
our computational grid employs @xmath344 zones on the box @xmath345 ^ 3 $ ] . by exploiting the symmetric nature of the problem
we reduce the computations to one octant ( @xmath346 ) at half the resolution this is easily achieved by symmetrizing all quantities with respect to the coordinate planes and flipping the signs of @xmath347 at @xmath213 , @xmath348 at @xmath216 , @xmath349 at @xmath243 .    figs .
[ fig : rmhd_blast3d ] shows the magnetic field distribution , thermal pressure and lorentz factor for the two configurations at @xmath350 . as a reference solution , computations on a cylindrical axisymmetric grid with @xmath351
$ ] zones are also shown .
the expanding region is delimited by a fast forward shock propagating radially at almost the speed of light .
because of the strong magnetic confinement a jet - like structure develops in the @xmath13 direction with a maximum lorentz factor of @xmath352
. this problem is particularly challenging because of the very small plasma @xmath353 and instructive in checking the robustness of the code and the algorithm response to different kinds of degeneracies .    scaling tests
have been conducted in a way similar to  [ sec : rhd_sph ] and corresponding performance are shown in fig .
[ fig : scaling ] .
in the context of astrophysical problems , where high mach number compressible flow dynamics plays a crucial role , a sizable number of numerical codes is now available to the community of scientists .
most of them are based on the reconstruct - solve - average strategy typical of the high - resolution shock - capturing godunov - type codes .
the reasons for choosing one code or another can be the most diverse , however , one can attempt to list a number of characteristics that a code should hold to be appealing for the skilled user , but not necessarily expert in numerics :    1 .   _ a modular structure : the possibility to easily code and combine different algorithms to treat different physics ; _ + pluto offers a number of features which can be combined together . besides four physical modules ( e.g. newtonian / relativistic hydrodynamics with or without magnetic fields ) , gravity , radiative cooling , resistivity , multidimensional geometries , equations of state
may be included where required ; 2 .
_ provide the user with a number of numerical schemes tested against the most severe benchmarks ; _ + several algorithms ( e.g. riemann solvers , interpolations , choice of boundary conditions and so on ) have been coded in pluto and their choice is dictated by the problem at hand and/or by efficiency and robustness issues .
3 .   _ portability ; _ + we have successfully ported pluto to a number of different unix - based systems among which ibm sp5/sp4 , sgi irix , linux beowulf clusters , power macintosh .
in addition the code can run in either serial , single - processor or parallel machines .
_ grid adaptivity : the ability to resolve flow features with different spatial and temporal scales on the same computational domain ; _ + the code provides a one - dimensional amr integrator and multidimensional extensions are being developed by taking advantage of the chombo library ( http://seesar.lbl.gov/anag/chombo/ ) .
this feature will be distributed with future versions of the code .
_ last but not least , user friendliness ; _ + a simple user - interface based on the python scripting language is available to setup a physical problem in a quick and self - explanatory way .
the interface is conceived to minimize the coding efforts left to the user .
we would like to thank s. ritta for his useful contributions to the under - expanded jet test and e. beltritti for extensively testing the code performances on several platforms . the present work was partially supported by the european community marie curie actions - human resource and mobility within the jetset network under contract mrtn - ct-2004 005592 .
numerical calculations were partly performed in cineca ( bologna , italy ) thanks to the support by inaf .
a. m. would like to thank r. rosner , t. linde and t. plewa and all the people at the flash center at the university of chicago for their helpful suggestions and discussions during the early development of the code .