Skip to content

Commit

Permalink
Minor language fixes in resonant-circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
MakisH authored Jun 27, 2024
1 parent 33f1dcb commit 36f2019
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions resonant-circuit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ summary: We simulate a two-element LC circuit (one inductor and one capacitor).

## Setup

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:
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:

![LC circuit diagram [1]](images/tutorials-resonant-circuit-diagram.svg)

Expand All @@ -17,9 +17,9 @@ $U(t) = L \frac{\text{d}I}{\text{d}t}$

$I(t) = -C \frac{\text{d}U}{\text{d}t}$

where $I$ is the current and $U$ the voltage of the cirucit.
where $I$ is the current and $U$ the voltage of the circuit.

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.
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.

## Configuration

Expand All @@ -36,23 +36,23 @@ preCICE configuration (image generated using the [precice-config-visualizer](htt

### MATLAB

For running this example, first get into one of folders with the solvers and open a MATLAB instance.
For running this example, first get into one of the solver folders and open a MATLAB instance.
Afterward, do the same for the second solver.
After adding the MATLAB bindings to the MATLAB path (in both instances), run the following commands:

In the first MATLAB instance one can run the solver for the current:
In the first MATLAB instance, one can run the solver for the current:

```MATLAB
coil
```

And in the second MATLAB instance the solver for the voltage:
And in the second MATLAB instance, the solver for the voltage:

```MATLAB
capacitor
```

The preCICE configuration file is available as `precice-config.xml`, and it is called directly in the solvers.
The preCICE configuration file is hard-coded as `precice-config.xml` in the solvers.

#### Running from terminal

Expand All @@ -67,7 +67,7 @@ The solver for the current also records the current and voltage through time and

After successfully running the coupling, one can find the curves in the folder `capacitor-matlab` as `Curves.png`.

The `Curves.png` plot could exemplarily look like the following:
Example of a `Curves.png` plot:
![Voltage and current plot of the resonant circuit](images/tutorials-resonant-circuit-curves.png)

## References
Expand Down

0 comments on commit 36f2019

Please sign in to comment.