23.01.2015 Views

Download - Wolfram Research

Download - Wolfram Research

Download - Wolfram Research

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.10 Interfaces 383<br />

View the file<br />

"Test.p1.dat" with<br />

SaberScope. Alternatively,<br />

read it again into<br />

Mathematica with<br />

ReadSimulationData.<br />

Plot the data with<br />

TransientPlot.<br />

In[3]:= data = ReadSimulationData["Test.p1.dat",<br />

Simulator −> "Saber"]<br />

Out[3]=<br />

F InterpolatingFunction0., 10., <br />

In[4]:= TransientPlot[data, "F"[t], {t, 0., 10.}]<br />

1<br />

0.5<br />

2 4 6 8 10 t<br />

F[t]<br />

-0.5<br />

-1<br />

Out[4]= Graphics <br />

3.10.5 WriteModel<br />

WriteModel["file", modelname, dae, ports, connections, Simulator−>sim]<br />

converts a DAEObject dae into a simulator-specific model<br />

with respect to the ports and the defined circuit interface<br />

given by connections<br />

Command structure of WriteModel.<br />

The function WriteModel converts a DAEObject dae into a behavioral model for a given simulator.<br />

An interface can be defined which connects the model with a circuit. The connections are then given<br />

by a list of rules of the form:<br />

{param 1 −> Voltage[port 1 , port 2 ],<br />

param 2 −> Current[port 3 , port 4 ],<br />

var 1 −> Voltage[port 5 , port 6 ],<br />

var 2 −> Current[port 7 , port 8 ]}<br />

This interface definition will generate two input port branches from port <br />

to port <br />

(voltage) and from<br />

port <br />

to port <br />

(current) and two output branches from port <br />

to port <br />

(voltage) and from port <br />

to port <br />

(current).<br />

WriteModel has the following options:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!