You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: resonant-circuit/README.md
+8-8
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ summary: We simulate a two-element LC circuit (one inductor and one capacitor).
7
7
8
8
## Setup
9
9
10
-
The purpose of this tutorial is to illustrate the usage of preCICE to couple MATLAB code. Two different MATLAB solvers will be coupled to simulate a two-element LC circuit. This type of circuit consists on a very simple system with one inductor and one capacitor:
10
+
The purpose of this tutorial is to illustrate the usage of preCICE to couple MATLAB code. Two different MATLAB solvers will be coupled to simulate a two-element LC circuit. This type of circuit consists of a very simple system with one inductor and one capacitor:
@@ -17,9 +17,9 @@ $U(t) = L \frac{\text{d}I}{\text{d}t}$
17
17
18
18
$I(t) = -C \frac{\text{d}U}{\text{d}t}$
19
19
20
-
where $I$ is the current and $U$ the voltage of the cirucit.
20
+
where $I$ is the current and $U$ the voltage of the circuit.
21
21
22
-
Each of these equations is going to be solved by a different MATLAB solver. Note that as only one scalar is solved per equation, this is a 0+1 dimensional problem.
22
+
Each of these equations is going to be solved by a different MATLAB solver. Note that, as only one scalar is solved per equation, this is a 0+1 dimensional problem.
23
23
24
24
## Configuration
25
25
@@ -36,23 +36,23 @@ preCICE configuration (image generated using the [precice-config-visualizer](htt
36
36
37
37
### MATLAB
38
38
39
-
For running this example, first get into one of folders with the solvers and open a MATLAB instance.
39
+
For running this example, first get into one of the solver folders and open a MATLAB instance.
40
40
Afterward, do the same for the second solver.
41
41
After adding the MATLAB bindings to the MATLAB path (in both instances), run the following commands:
42
42
43
-
In the first MATLAB instance one can run the solver for the current:
43
+
In the first MATLAB instance, one can run the solver for the current:
44
44
45
45
```MATLAB
46
46
coil
47
47
```
48
48
49
-
And in the second MATLAB instance the solver for the voltage:
49
+
And in the second MATLAB instance, the solver for the voltage:
50
50
51
51
```MATLAB
52
52
capacitor
53
53
```
54
54
55
-
The preCICE configuration file is available as `precice-config.xml`, and it is called directly in the solvers.
55
+
The preCICE configuration file is hard-coded as `precice-config.xml` in the solvers.
56
56
57
57
#### Running from terminal
58
58
@@ -67,7 +67,7 @@ The solver for the current also records the current and voltage through time and
67
67
68
68
After successfully running the coupling, one can find the curves in the folder `capacitor-matlab` as `Curves.png`.
69
69
70
-
The `Curves.png` plot could exemplarily look like the following:
70
+
Example of a `Curves.png` plot:
71
71

0 commit comments