Newer
Older
This repository contains a **Modelica** project that models and simulates electrical fuses. It demonstrates fuses at increasing levels of detail (Levels 1, 2, and 3), investigating how they blow under various current and thermal conditions.
The code is organized under a top-level package called **`ProjectModelica`**, which includes:
- **Materials**: Contains material properties (e.g., aluminum, silver).
- **Fuse (partial model)**: A base fuse model with placeholders for thermal and electrical parameters.
- **FuseNiveau1**, **FuseNiveau2**, **FuseNiveau3**: Different fuse implementations with increasing complexity. Each comes with its own test models.
---
## Table of Contents
1. [Project Overview](#project-overview)
2. [Features](#features)
3. [Repository Structure](#repository-structure)
4. [Usage Instructions](#usage-instructions)
- [Loading in a Modelica Tool](#loading-in-a-modelica-tool)
- [Running Simulations](#running-simulations)
5. [Fuse Levels: Explanation](#fuse-levels-explanation)
6. [Parameter Sweeps / Multiple Tests](#parameter-sweeps--multiple-tests)
7. [Further Development](#further-development)
8. [License](#license)
9. [Contact](#contact)
---
## Project Overview
Fuses are protective devices that open an electrical circuit when the current exceeds a certain threshold or when the fuse’s material reaches a certain temperature. This project:
- Implements **material properties** for fuse wire (thermal conductivity, resistivity, density, specific heat, etc.).
- Shows how to create **progressively more detailed models** of a fuse in Modelica, from a simple threshold-based approach to a discretized thermal model.
- Demonstrates **testing** through different test circuits (TestFuse models).
- **Parametric Material Library**: Possible to switch between fuse materials (aluminium and silver).
- **Incremental Modeling**:
- **Niveau 1**: Instant fuse blow based on current threshold.
- **Niveau 2**: Temperature-based fuse blow.
- **Niveau 3**: Spatially discretized thermal model (conduction + convection).
- **Multiple Test Suites**: Each level has test models to illustrate how the fuse reacts to changing input current.
- **Parameter Sweeps**: The `MultipleTest` models allow systematic testing over a range of currents.
## Repository Structure
Below is a high-level view of the main filespackages:
│ └─ (Constants for aluminium, silver, etc.)
│ ├─ Fuse2.mo
│ ├─ TestFuse2.mo
│ └─ MultipleTest2.mo
│ ├─ Fuse3.mo
│ ├─ TestFuse3.mo
│ └─ MultipleTest3.mo
└─ (Supporting package and model definitions)
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
1. **`Materials`**
- **`MaterialProp.mo`**: Defines `MaterialProp`, a record holding properties like fusion temperature, density, specific heat, resistivity, etc.
- Includes constants such as `aluminium` and `silver`.
2. **`Fuse.mo`** (partial model)
- A base class parameterized by `mat` (material), plus placeholders for thermal/electrical properties (`Ron`, `Roff`, etc.).
3. **`FuseNiveau1`**
- **`Fuse1.mo`**: Extends the base fuse. Has a simple threshold on the current; if current exceeds `In`, the fuse is considered blown, and the voltage drop changes from `Ron * i` to `Roff * i`.
- **`TestFuse1.mo`**: Demonstrates how the fuse behaves in a simple circuit with a ramp voltage.
4. **`FuseNiveau2`**
- **`Fuse2.mo`**: Adds a thermal equation. The fuse blows when the temperature exceeds the material’s fusion temperature.
- **`TestFuse2.mo`**: Single scenario test (set a `TestCurrent` and observe meltdown time).
- **`MultipleTest2.mo`**: Runs the same fuse design against multiple current values.
5. **`FuseNiveau3`**
- **`Fuse3.mo`**: A more advanced model, discretizing the fuse wire into N segments to compute temperature distribution (Fourier’s law for conduction, plus convection losses).
- **`TestFuse3.mo`**: Tests the discretized fuse at a single current value.
- **`MultipleTest3.mo`**: Tests the fuse across a range of current values to observe meltdown times vs. current.
---
## Usage Instructions
### Loading in a Modelica Tool
1. **Clone or Download** this repository:
```bash
git clone https://gitlab-student.centralesupelec.fr/ola.sawan/fuseproject.git
cd fuseproject
2. **Open your Modelica tool** (e.g., **OpenModelica**).
3. **Load the Package**:
- In OpenModelica, go to **File > Open** and select the top-level `.mo` files (e.g., open the folder containing `ProjectModelica` and ensure the `within ...` statements are recognized).
### Running Simulations
Each `TestFuseX` model can be simulated using your Modelica tool’s GUI:
1. **Navigate** to the desired test model (for example, `ProjectModelica.FuseNiveau1.TestFuse1`).
## Fuse Levels: Explanation
### Niveau 1
- **Simple threshold on current (`In`)**.
- If \(`|i| > In`\), fuse output `y` becomes `false` (the fuse is blown).
- Voltage drop changes from `Ron * i` to `Roff * i`.
### Niveau 2
- A **thermal model**: the fuse’s temperature is computed as one averaged value.
- If `T > Tf` (material fusion temperature), the fuse blows.
### Niveau 3
- **Spatial discretization** of the fuse wire into N segments, modeling conduction and convection in each segment.
- The fuse blows when **any** segment’s temperature reaches `Tf`.
---
## Parameter Sweeps / Multiple Tests
- **`MultipleTest2`** and **`MultipleTest3`** run the same fuse design for multiple input currents (`tab_TestCurrent` array).
- They produce:
- `tab_FusionTime`: meltdown time for each current.
- `tab_StateFuse`: final fuse state (blown or not).
Run them just like a single test, then analyze or plot the multiple outputs to see how fuse blow time varies with current.
---
## Further Development
- **Add More Materials**: Extend `Materials.MaterialProp` with new constants for different alloys/metals.
- **Refine Heat Transfer**: Incorporate radiation or more detailed convection correlations.
- **Variable Cross-Section**: Niveau 3 has a cross-section that varies along the wire length; experiment with other shapes.