Browse Source

Fix whitespace

Arkadiusz Ryś 2 years ago
parent
commit
63887ae1ec
2 changed files with 4 additions and 3 deletions
  1. 1 1
      README.md
  2. 3 2
      damper/system.py

+ 1 - 1
README.md

@@ -7,7 +7,7 @@ The formula we follow to achieve this is: `0 = 100 - 2y' - 100y - y"`.
 Here, the friction coefficient is `0.02 Ns/m` and the spring constant is `1 N/m` with the block weighing in at `0.01 kg`.
 
 The simulated position (distance) of the spring is described by the following graph.
+
 ![execution-trace](docs/trace.png)
 
 In the example we are interested in the spring constant `k` which results in almost zero oscillation (equilibrium) in the time frame of `[5, 7]` seconds after impulse release.
-

+ 3 - 2
damper/system.py

@@ -1,7 +1,5 @@
 from dataclasses import dataclass
-
 from matplotlib import patches
-
 from cbd.core import CBD, Signal
 from cbd.simulator import Simulator
 from cbd.lib.std import ProductBlock, AdderBlock, IntegratorBlock, ConstantBlock
@@ -9,6 +7,7 @@ import matplotlib.pyplot as plt
 import arklog
 import logging
 
+
 class SpringMassDamper(CBD):
     """
     Causal Block Diagram of a Spring Mass Damper system.
@@ -60,6 +59,7 @@ class SpringMassDamper(CBD):
         self.addConnection("const4", "int1",  output_port_name="OUT1", input_port_name="IC")
         self.addConnection("const4", "int2",  output_port_name="OUT1", input_port_name="IC")
 
+
 def plot_experiment(signals: [Signal]):
     """Show the plot of the experiment signals containing the mass position at a certain time."""
     logging.debug("Generating experiment plot.")
@@ -81,6 +81,7 @@ def plot_experiment(signals: [Signal]):
     ax.legend(handles=handles, loc="upper right")
     plt.show()
 
+
 @dataclass(frozen=True, slots=True)
 class TimeFrame:
     """Experiment time frame. Denotes a start and stop time as floating point numbers representing seconds."""