{% extends "base_framework.html" %} {% load staticfiles %}

{% block main_body_content %} {% if ckt_error_list %}

The following errors have been found in the simulation. Go back to the previous page and click on the "Edit Simulation", "Add circuits" and "Edit parameters" buttons to make corrections.

    {% for ckt_error_item in ckt_error_list %}
  1. {{ ckt_error_item }}
  2. {% endfor %}
{% else %}

Read the instructions below for more information.

{% if run_state == 0 %}

The simulation is ready, click on the Run button to start it.

{% endif %} {% if run_state == 1 %}

The simulation is running. If you want to restart it, click on the Stop button to stop the simulation and then click on Run.

{% endif %} {% if run_state == 2 %}

The simulation has been stopped. If you want to restart it, click on the Run button.

{% endif %} {% if run_state == 0 or run_state == 2 %} {% endif %} {% if run_state == 1 %} {% endif %} {% endif %}

Click on the "Export plot" button below to create a Matplotlib file for publication quality plots. Look for the file auto_plot.py in the working directory.



Use the time fields next to each plot to zoom a plot.

If the time range is invalid, the entire data file will be plotted.

Click on the "Add plot" button below to create a new plot.


{% if form_type == 1 %} {% if form %}

{% for control_item in form %}
{{ control_item }}
{% endfor %} {% csrf_token %}
{% endif %} {% endif %} {% if new_plot %}

Plot title: {{ new_plot.plot_title }}
{% for waveform in new_plot.circuitwaveforms_set.all %} {% for waveform_plot in waveform.waveform.all %} {{ waveform_plot.line_name }} -> {{ waveform.waveform_legend }}
{% endfor %} {% endfor %}
{% endif %}
{% if form_type == 2 %} {% if form %}
{% for control_item in form %}
{{ control_item }}
{% endfor %}
Waveform source:
{% csrf_token %}

Click this once all waveforms are added.


{% endif %} {% endif %} {% if plot_list %} {% for plot_item in plot_list %} {% if plot_item.id != new_plot_id %}

{{ forloop.counter }}.
Plot title: {{ plot_item.plot_title }}
{% for waveform in plot_item.circuitwaveforms_set.all %} {% for waveform_plot in waveform.waveform.all %} {{ waveform_plot.line_name }} -> {{ waveform.waveform_legend }}
{% endfor %} {% endfor %}
X-Zoom
Start:
Stop:
Y-Zoom
Start:
Stop:

{% csrf_token %}
{% endif %} {% endfor %} {% else %}

No plots to display. Use the "Add plot" button to add a plot.

{% endif %}



Instructions

  1. If there are no errors in the circuit files, a "Run" button will appear which means that you can run the simulation.
  2. Once you a run a simulation, it will remain in the run state until you stop it or close the server. So you can go to another page, browse through circuit lists and data and the simulation will keep running. Also, when the simulation is done, the simulation will remain in the run state. You need to stop the simulation to be able to restart it.
  3. If this is a new simulation, there will be no circuit plots. Circuit plots are saved to the database and are associated with a simulation case.
  4. For a new simulation, you must run the simulation to be able to add plots. For an existing simulation, it is recommended to run the simulation to register any updates in the circuit for adding to the plots.
  5. To add a plot, click on the "Add plot" button.
  6. A circuit plot needs to be given a title. The title is important as when a plot is requested, the waveforms are saved in a PNG file having a name same as the title but without spaces.
  7. After choosing the title, click on "Start plot". This will now allow you to add waveforms.
  8. To add a waveform, click on the "Add waveform" button. This will display a form with the waveform legend which is what will appear on the waveform, the scale which is used to magnify or attenuate a waveform and the source of the waveform which is a drop down list. This list contains all the meters and variable storage elements in the simulation.
  9. Do not forget to click on the "Save waveform" button after entering data.
  10. You can have multiple waveforms in a plot with different scales to compare different quantities.
  11. Once done adding all the waveforms, click on "Save plot" button to save the plot. The plot will now appear in a list with a "Plot" button and a "Delete" button next to it.
  12. Add as many plots as needed. There is no provision to edit a plot. Delete an existing plot and add a new one.
  13. The time range specified above can be used to generate a zoomed in plot. If an invalid time range is specified, the entire data file is plotted and no error will be generated.
  14. When the "Plot" button is clicked, a PNG file with the waveform will be stored in the working directory. The name of the file will be the same as the title but without spaces. For example, "Plot 1" will be Plot1.png. "Current vs Voltage" will be CurrentvsVoltage.png.
  15. You can click on the "Plot" button as many times while the simulation runs. The old PNG file will be deleted and a new file will be written to.


{% endblock %}