Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

voltage_source Class Reference

A 1-port resistor (terminator) that can be a power source. More...

#include <sources.h>

Inheritance diagram for voltage_source::

nport device List of all members.

Public Methods

 voltage_source ()
 Constructor. More...

int size ()
 Voltage sources are 1-port devices. More...

const nport::data_infoget_data_info ()

Public Attributes

parameter R
 Resistance in standard units. More...

parameter Temp
 Temperature in standard units. More...

parameter source_f
 Source frequency in standard units. More...

parameter source_width
 Source frequency width in standard units. More...

parameter source_voltage
 Source voltage in standard units. More...

parameter source_phase
 Source phase in standard units (Radians). More...


Private Methods

void recalc ()
 The function for calculating sdata. More...

void recalc_S ()
 If the following function is implemented, it should only calculate the S matrix and B vector parts of data, leaving the C matrix part stale. More...


Detailed Description

A 1-port resistor (terminator) that can be a power source.

For this device, a source voltage is specified in source_voltage and source_phase.

The default is to create an ideal voltage source, with R = 0. Only a real resistance R can be specified for this device; if a complex impedance is required, use an ideal source and couple it to the circuit through a 2-port with the desired series impedance.

The source frequency is held in source_f, and the frequency width of the source is held in source_width.

If the global frequency differs from source_f by more than source_width/2, then the source vector sdata::B will be set to 0.

See also:
generator , current_sink

Definition at line 151 of file sources.h.


Constructor & Destructor Documentation

voltage_source::voltage_source ( )
 

Constructor.

Definition at line 93 of file sources.cc.


Member Function Documentation

const nport::data_info & voltage_source::get_data_info ( ) [virtual]
 

Returns:
info about the sdata of the device

Reimplemented from nport.

Definition at line 103 of file sources.cc.

void voltage_source::recalc ( ) [private, virtual]
 

The function for calculating sdata.

recalc() should do the following:

  • (1) Read device::f, device::Z0, and, by default, device::T to get the operating conditions for the response calculation.
  • (2) Calculate the S, C, and B matrix values and store them to nport::data, with all values normalized using device::Z0.
  • (3) Store the normalizing impedance to nport::data by calling data.set_znorm().

Reimplemented from nport.

Definition at line 125 of file sources.cc.

void voltage_source::recalc_S ( ) [private, virtual]
 

If the following function is implemented, it should only calculate the S matrix and B vector parts of data, leaving the C matrix part stale.

Reimplemented from nport.

Definition at line 110 of file sources.cc.

Referenced by recalc().

int voltage_source::size ( ) [inline, virtual]
 

Voltage sources are 1-port devices.

Returns:
the number of ports

Reimplemented from nport.

Definition at line 183 of file sources.h.


Member Data Documentation

parameter voltage_source::R
 

Resistance in standard units.

Shadows device::Z0 by default.

Definition at line 155 of file sources.h.

parameter voltage_source::Temp
 

Temperature in standard units.

Shadows global temperature T by default.

Definition at line 161 of file sources.h.

parameter voltage_source::source_f
 

Source frequency in standard units.

Default is 0.

Definition at line 164 of file sources.h.

parameter voltage_source::source_phase
 

Source phase in standard units (Radians).

Default is 0.

Definition at line 173 of file sources.h.

parameter voltage_source::source_voltage
 

Source voltage in standard units.

Default is 0.

Definition at line 170 of file sources.h.

parameter voltage_source::source_width
 

Source frequency width in standard units.

Default is 0.

Definition at line 167 of file sources.h.


The documentation for this class was generated from the following files:

Please direct comments and corrections to supermix@submm.caltech.edu
Go to the supermix home page
Generated by doxygen1.2.7