BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
cl_Inductor.hpp
Go to the documentation of this file.
1/*
2 * BELFEM -- The Berkeley Lab Finite Element Framework
3 * Copyright (c) 2026, The Regents of the University of California,
4 * through Lawrence Berkeley National Laboratory (subject to receipt of any required
5 * approvals from the U.S. Dept. of Energy). All rights reserved.
6 *
7 * Developers: Christian Messe, Gregory Giard
8 *
9 * See the top-level LICENSE file for the complete license and disclaimer.
10 */
11
12#ifndef BELFEM_CL_INDUCTOR_HPP
13#define BELFEM_CL_INDUCTOR_HPP
14
15#include "cl_TwoTerminals.hpp"
16#include "Component_Enums.hpp"
17#include "cl_BDF.hpp"
18
19namespace belfem
20{
21 namespace electronics
22 {
23//-----------------------------------------------------------------------------
24
25 class Inductor : public TwoTerminals
26 {
28 real mValue ;
29
31 real mRL ;
32
34 real miLh = 0.0 ;
35
37 ode::BDF * mBDF = nullptr;
38
41
44
46 real mDeltaTime ;
47
49 uint mOrder = 1 ;
50
51//------------------------------------------------------------------------------
52
58 void
59 update_companions() ;
60
61//------------------------------------------------------------------------------
62 public:
63//------------------------------------------------------------------------------
64
65 Inductor(const real aValue, const uint aOrder, Cell < ElectricNode* > & aTerminals, string aLabel = "") ;
66
67 ~Inductor() override ;
68
69//------------------------------------------------------------------------------
70
72 component_type() const override ;
73
74//-----------------------------------------------------------------------------
75
76 void
77 compute_current() override ;
78
79//------------------------------------------------------------------------------
80
81 void
82 shift( const real aTime, const real aDeltaTime ) override ;
83
84//------------------------------------------------------------------------------
85
86 void
87 shift_back() override ;
88
89//------------------------------------------------------------------------------
90
91 void
92 set_timestep( const real aDeltaTime ) override ;
93
94//------------------------------------------------------------------------------
95
96 void
97 save_state( hid_t aGroup, const string & aPrefix ) override ;
98
99//------------------------------------------------------------------------------
100
101 void
102 load_state( hid_t aGroup, const string & aPrefix ) override ;
103
104//------------------------------------------------------------------------------
105
106 real
107 get_value() const override ;
108
109//------------------------------------------------------------------------------
110
111 real
112 get_discretized_resistance() const override ;
113
114//------------------------------------------------------------------------------
115
116 real
117 get_discretized_source() const override ;
118
119//------------------------------------------------------------------------------
120
121 };
122
123 inline ComponentType
125 {
127 }
128
129//-----------------------------------------------------------------------------
130 }
131}
132
133#endif //BELFEM_CL_INDUCTOR_HPP
void save_state(hid_t aGroup, const string &aPrefix) override
write this component's time-stepping state into the restart group, dataset names prefixed with aPrefi...
Definition cl_Inductor.cpp:112
real get_value() const override
Definition cl_Inductor.cpp:150
void compute_current() override
Definition cl_Inductor.cpp:37
void load_state(hid_t aGroup, const string &aPrefix) override
restore the state written by save_state().
Definition cl_Inductor.cpp:126
real get_discretized_resistance() const override
Definition cl_Inductor.cpp:158
void shift(const real aTime, const real aDeltaTime) override
Definition cl_Inductor.cpp:46
void shift_back() override
Definition cl_Inductor.cpp:84
void set_timestep(const real aDeltaTime) override
Definition cl_Inductor.cpp:103
ComponentType component_type() const override
Definition cl_Inductor.hpp:124
Inductor(const real aValue, const uint aOrder, Cell< ElectricNode * > &aTerminals, string aLabel="")
Definition cl_Inductor.cpp:21
real get_discretized_source() const override
Definition cl_Inductor.cpp:166
TwoTerminals(Cell< ElectricNode * > &aTerminals, string aLabel="")
Definition cl_TwoTerminals.cpp:20
Definition cl_BDF.hpp:26
Definition cl_Capacitor.cpp:18
ComponentType
Definition Component_Enums.hpp:22
@ INDUCTOR
Definition Component_Enums.hpp:25
USER GUIDES:
Definition cl_Capacitor.cpp:16
int hid_t
Definition hdf5_types.hpp:20
unsigned int uint
Definition typedefs.hpp:30
double real
Definition typedefs.hpp:36