$(instance)DeSauty Icon

DeSauty

Usage

DeSauty(C₁=30μ, C₂=1μ)

Parameters:

NameDescriptionUnitsDefault value
C₁F0.000029999999999999997
C₂F0.000001

Behavior

\[ \begin{equation} \left[ \begin{array}{c} \mathrm{connect}\left( input_{signal_{+}y(t)}, source_{+}V(t) \right) \\ \mathrm{connect}\left( source_{+}p, capacitor1_{+}n, capacitor2_{+}n \right) \\ \mathrm{connect}\left( source_{+}n, resistor1_{+}p, resistor2_{+}p \right) \\ \mathrm{connect}\left( source_{+}n, ground_{+}g \right) \\ \mathrm{connect}\left( resistor1_{+}n, current_{sensor_{+}p}, capacitor1_{+}p \right) \\ \mathrm{connect}\left( resistor2_{+}n, current_{sensor_{+}n}, capacitor2_{+}p \right) \\ \mathtt{resistor1.v}\left( t \right) = - \mathtt{resistor1.n.v}\left( t \right) + \mathtt{resistor1.p.v}\left( t \right) \\ \mathtt{resistor1.i}\left( t \right) = \mathtt{resistor1.p.i}\left( t \right) \\ \mathtt{resistor1.n.i}\left( t \right) + \mathtt{resistor1.p.i}\left( t \right) = 0 \\ \mathtt{resistor1.v}\left( t \right) = \mathtt{resistor1.R} \mathtt{resistor1.i}\left( t \right) \\ \mathtt{resistor2.v}\left( t \right) = - \mathtt{resistor2.n.v}\left( t \right) + \mathtt{resistor2.p.v}\left( t \right) \\ \mathtt{resistor2.i}\left( t \right) = \mathtt{resistor2.p.i}\left( t \right) \\ \mathtt{resistor2.p.i}\left( t \right) + \mathtt{resistor2.n.i}\left( t \right) = 0 \\ \mathtt{resistor2.v}\left( t \right) = \mathtt{resistor2.R} \mathtt{resistor2.i}\left( t \right) \\ \mathtt{capacitor1.v}\left( t \right) = - \mathtt{capacitor1.n.v}\left( t \right) + \mathtt{capacitor1.p.v}\left( t \right) \\ \mathtt{capacitor1.i}\left( t \right) = \mathtt{capacitor1.p.i}\left( t \right) \\ \mathtt{capacitor1.n.i}\left( t \right) + \mathtt{capacitor1.p.i}\left( t \right) = 0 \\ \mathtt{capacitor1.C} \frac{\mathrm{d} \mathtt{capacitor1.v}\left( t \right)}{\mathrm{d}t} = \mathtt{capacitor1.i}\left( t \right) \\ \mathtt{capacitor2.v}\left( t \right) = \mathtt{capacitor2.p.v}\left( t \right) - \mathtt{capacitor2.n.v}\left( t \right) \\ \mathtt{capacitor2.i}\left( t \right) = \mathtt{capacitor2.p.i}\left( t \right) \\ \mathtt{capacitor2.n.i}\left( t \right) + \mathtt{capacitor2.p.i}\left( t \right) = 0 \\ \mathtt{capacitor2.C} \frac{\mathrm{d} \mathtt{capacitor2.v}\left( t \right)}{\mathrm{d}t} = \mathtt{capacitor2.i}\left( t \right) \\ \mathtt{current\_sensor.p.v}\left( t \right) = \mathtt{current\_sensor.n.v}\left( t \right) \\ \mathtt{current\_sensor.p.i}\left( t \right) = \mathtt{current\_sensor.i}\left( t \right) \\ \mathtt{current\_sensor.n.i}\left( t \right) = - \mathtt{current\_sensor.i}\left( t \right) \\ \mathtt{source.v}\left( t \right) = - \mathtt{source.n.v}\left( t \right) + \mathtt{source.p.v}\left( t \right) \\ \mathtt{source.i}\left( t \right) = \mathtt{source.p.i}\left( t \right) \\ \mathtt{source.p.i}\left( t \right) + \mathtt{source.n.i}\left( t \right) = 0 \\ \mathtt{source.v}\left( t \right) = \mathtt{source.uV} \mathtt{source.V}\left( t \right) \\ \mathtt{input\_signal.y}\left( t \right) = ifelse\left( \mathtt{input\_signal.start\_time} < t, \mathtt{input\_signal.offset} + \mathtt{input\_signal.amplitude} \sin\left( \mathtt{input\_signal.phase} + 6.2832 \mathtt{input\_signal.frequency} \left( - \mathtt{input\_signal.start\_time} + t \right) \right), \mathtt{input\_signal.offset} \right) \\ \mathtt{ground.g.v}\left( t \right) = 0 \\ \end{array} \right] \end{equation} \]

Source

example component DeSauty
  resistor1 = Resistor(R=5.0) [{
    "JuliaSim": {
      "placement": {"icon": {"x1": 800, "y1": 700, "x2": 1000, "y2": 900, "rot": 180}}
    }
  }]
  resistor2 = Resistor(R=2.0) [{
    "JuliaSim": {
      "placement": {"icon": {"x1": 800, "y1": 1300, "x2": 1000, "y2": 1500, "rot": 180}}
    }
  }]
  capacitor1 = Capacitor(C=C₁) [{
    "JuliaSim": {
      "placement": {"icon": {"x1": 200, "y1": 700, "x2": 400, "y2": 900, "rot": 180}}
    }
  }]
  capacitor2 = Capacitor(C=C₂) [{
    "JuliaSim": {
      "placement": {"icon": {"x1": 200, "y1": 1300, "x2": 400, "y2": 1500, "rot": 180}}
    }
  }]
  current_sensor = CurrentSensor() [{
    "JuliaSim": {
      "placement": {"icon": {"x1": 500, "y1": 1000, "x2": 700, "y2": 1200, "rot": 90}}
    }
  }]
  source = VoltageSource() [{
    "JuliaSim": {"placement": {"icon": {"x1": 500, "y1": 400, "x2": 700, "y2": 600}}}
  }]
  input_signal = BlockComponents.Sine(frequency=100.0, amplitude=1, phase=0) [{
    "JuliaSim": {"placement": {"icon": {"x1": 500, "y1": 100, "x2": 700, "y2": 300, "rot": 90}}}
  }]
  ground = Ground() [{
    "JuliaSim": {"placement": {"icon": {"x1": 1150, "y1": 1150, "x2": 1350, "y2": 1350}}}
  }]
  parameter C₁::Capacitance = 30μ
  parameter C₂::Capacitance = 1μ
relations
  initial capacitor1.v = 0.0
  connect(input_signal.y, source.V) [{"JuliaSim": {"edges": [{"S": 1, "E": 2}]}}]
  connect(source.p, capacitor1.n, capacitor2.n) [{
    "JuliaSim": {
      "edges": [
        {"S": 1, "M": [{"x": 100, "y": 500}, {"x": 100, "y": 1100}], "E": -1},
        {"S": 2, "M": [{"x": 150, "y": 800}], "E": -1},
        {"S": 3, "M": [{"x": 150, "y": 1400}], "E": -1}
      ],
      "junctions": [{"x": 150, "y": 1100}]
    }
  }]
  connect(source.n, resistor1.p, resistor2.p) [{
    "JuliaSim": {
      "edges": [
        {"S": 1, "M": [{"x": 1100, "y": 500}, {"x": 1100, "y": 1100}], "E": -1},
        {"S": 2, "M": [{"x": 1050, "y": 800}], "E": -1},
        {"S": 3, "M": [{"x": 1050, "y": 1400}], "E": -1}
      ],
      "junctions": [{"x": 1050, "y": 1100}]
    }
  }]
  connect(source.n, ground.g) [{
    "JuliaSim": {
      "edges": [{"S": 2, "M": [{"x": 1250, "y": 1100}], "E": -1}],
      "junctions": [{"x": 1100, "y": 1100}]
    }
  }]
  connect(resistor1.n, current_sensor.p, capacitor1.p) [{
    "JuliaSim": {
      "edges": [{"S": 1, "E": -1}, {"S": 2, "E": -1}, {"S": 3, "E": -1}],
      "junctions": [{"x": 600, "y": 800}]
    }
  }]
  connect(resistor2.n, current_sensor.n, capacitor2.p) [{
    "JuliaSim": {
      "edges": [{"S": 1, "E": -1}, {"S": 2, "E": -1}, {"S": 3, "E": -1}],
      "junctions": [{"x": 600, "y": 1400}]
    }
  }]
end
Flattened Source
example component DeSauty
  resistor1 = Resistor(R=5.0) [{
    "JuliaSim": {
      "placement": {"icon": {"x1": 800, "y1": 700, "x2": 1000, "y2": 900, "rot": 180}}
    }
  }]
  resistor2 = Resistor(R=2.0) [{
    "JuliaSim": {
      "placement": {"icon": {"x1": 800, "y1": 1300, "x2": 1000, "y2": 1500, "rot": 180}}
    }
  }]
  capacitor1 = Capacitor(C=C₁) [{
    "JuliaSim": {
      "placement": {"icon": {"x1": 200, "y1": 700, "x2": 400, "y2": 900, "rot": 180}}
    }
  }]
  capacitor2 = Capacitor(C=C₂) [{
    "JuliaSim": {
      "placement": {"icon": {"x1": 200, "y1": 1300, "x2": 400, "y2": 1500, "rot": 180}}
    }
  }]
  current_sensor = CurrentSensor() [{
    "JuliaSim": {
      "placement": {"icon": {"x1": 500, "y1": 1000, "x2": 700, "y2": 1200, "rot": 90}}
    }
  }]
  source = VoltageSource() [{
    "JuliaSim": {"placement": {"icon": {"x1": 500, "y1": 400, "x2": 700, "y2": 600}}}
  }]
  input_signal = BlockComponents.Sine(frequency=100.0, amplitude=1, phase=0) [{
    "JuliaSim": {"placement": {"icon": {"x1": 500, "y1": 100, "x2": 700, "y2": 300, "rot": 90}}}
  }]
  ground = Ground() [{
    "JuliaSim": {"placement": {"icon": {"x1": 1150, "y1": 1150, "x2": 1350, "y2": 1350}}}
  }]
  parameter C₁::Capacitance = 30μ
  parameter C₂::Capacitance = 1μ
relations
  initial capacitor1.v = 0.0
  connect(input_signal.y, source.V) [{"JuliaSim": {"edges": [{"S": 1, "E": 2}]}}]
  connect(source.p, capacitor1.n, capacitor2.n) [{
    "JuliaSim": {
      "edges": [
        {"S": 1, "M": [{"x": 100, "y": 500}, {"x": 100, "y": 1100}], "E": -1},
        {"S": 2, "M": [{"x": 150, "y": 800}], "E": -1},
        {"S": 3, "M": [{"x": 150, "y": 1400}], "E": -1}
      ],
      "junctions": [{"x": 150, "y": 1100}]
    }
  }]
  connect(source.n, resistor1.p, resistor2.p) [{
    "JuliaSim": {
      "edges": [
        {"S": 1, "M": [{"x": 1100, "y": 500}, {"x": 1100, "y": 1100}], "E": -1},
        {"S": 2, "M": [{"x": 1050, "y": 800}], "E": -1},
        {"S": 3, "M": [{"x": 1050, "y": 1400}], "E": -1}
      ],
      "junctions": [{"x": 1050, "y": 1100}]
    }
  }]
  connect(source.n, ground.g) [{
    "JuliaSim": {
      "edges": [{"S": 2, "M": [{"x": 1250, "y": 1100}], "E": -1}],
      "junctions": [{"x": 1100, "y": 1100}]
    }
  }]
  connect(resistor1.n, current_sensor.p, capacitor1.p) [{
    "JuliaSim": {
      "edges": [{"S": 1, "E": -1}, {"S": 2, "E": -1}, {"S": 3, "E": -1}],
      "junctions": [{"x": 600, "y": 800}]
    }
  }]
  connect(resistor2.n, current_sensor.n, capacitor2.p) [{
    "JuliaSim": {
      "edges": [{"S": 1, "E": -1}, {"S": 2, "E": -1}, {"S": 3, "E": -1}],
      "junctions": [{"x": 600, "y": 1400}]
    }
  }]
metadata {}
end

Test Cases

  • Examples
  • Experiments
  • Analyses