<simulation>    
<note>Starfish Tutorial: Part 2</note>

<!-- load input files -->
<load>domain.xml</load>
<load>materials.xml</load>
<load>boundaries.xml</load>

<!-- set potential solver -->
<solver type="poisson">
<method>gs</method>
<n0>1e10</n0>
<Te0>1.5</Te0>
<phi0>0</phi0>
<max_it>1e4</max_it>
<nl_max_it>25</nl_max_it>
<tol>1e-6</tol>
<nl_tol>1e-4</nl_tol>
</solver>

<!--
<solver type="constant-ef">
<comps>0,-500</comps>
</solver>
-->

<!-- set sources -->
<sources>
<boundary_source name="space">
<type>uniform</type>
<material>O+</material>
<boundary>inlet</boundary>
<mdot>3.72e-13</mdot>
<v_drift>7000</v_drift>
</boundary_source>
</sources>

<!-- set time parameters -->
<time>
<num_it>400</num_it>
<dt>1e-7</dt>
</time>

<!-- save animation -->
<animation start_it="1" frequency="10">
<output type="2D" file_name="results/field_ani.vts" format="vtk"> 
<scalars>phi,rho, nd.O+, t.o+</scalars>
<vectors>[u.O+,v.O+]</vectors>
</output>
</animation>

<!-- run simulation -->
<starfish />

<!-- save mesh-based results in VTK format-->
<output type="2D" file_name="results/field.vts" format="vtk">
<scalars>phi, rho, nd.O+</scalars>
<vectors>[efi, efj], [u.o+,v.o+]</vectors>
</output>

<!-- save data along a single mesh grid line -->
<output type="1D" file_name="results/profile.vts" format="vtk">
    <type>1D</type>
<mesh>mesh1</mesh>
<index>J=0</index>
<scalars>phi, rho, nd.o+</scalars>
<vectors>[efi, efj],[u.o+,v.o+]</vectors>
</output>

<!-- save geometry in VTK format -->
<output type="boundaries" file_name="results/boundaries.vtp" format="vtk" />

</simulation>