BELFEM
0.9.0
Berkeley Lab Finite Element Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
cl_FEMTwoTerminals.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_FEMTWOTERMINALS_HPP
13
#define BELFEM_CL_FEMTWOTERMINALS_HPP
14
15
#include "
cl_TwoTerminals.hpp
"
16
#include "
Component_Enums.hpp
"
17
#include "
cl_Vector.hpp
"
18
#include "
cl_BDF.hpp
"
19
20
namespace
belfem
21
{
22
namespace
electronics
23
{
24
//-----------------------------------------------------------------------------
25
32
class
FEMTwoTerminals
:
public
TwoTerminals
33
{
34
36
real
mIn = 0.0 ;
37
39
real
mVn = 0.0 ;
40
42
//real mRFEM = 1e-10 ;
43
44
//real miFEMh = 0.0 ;
45
47
ode::BDF
* mBDF =
nullptr
;
48
50
ShiftRegister< real >
mH ;
51
53
ShiftRegister< real >
mI ;
54
56
ShiftRegister< real >
mV ;
57
59
//uint mOrder = 1 ;
60
61
//------------------------------------------------------------------------------
62
public
:
63
//------------------------------------------------------------------------------
64
65
FEMTwoTerminals
(Cell < ElectricNode* > & aTerminals,
string
aLabel =
""
) ;
66
67
//------------------------------------------------------------------------------
68
69
ComponentType
70
component_type
()
const override
;
71
72
//-----------------------------------------------------------------------------
73
74
void
75
compute_current
()
override
;
76
77
//------------------------------------------------------------------------------
78
79
void
80
shift
(
const
real
aTime,
const
real
aDeltaTime )
override
;
81
82
//------------------------------------------------------------------------------
83
84
void
85
shift_back
()
override
;
86
87
//------------------------------------------------------------------------------
88
89
void
90
set_IV
(
const
real
I,
const
real
V ) ;
91
92
//------------------------------------------------------------------------------
93
94
void
95
save_state
(
hid_t
aGroup,
const
string
& aPrefix )
override
;
96
97
//------------------------------------------------------------------------------
98
99
void
100
load_state
(
hid_t
aGroup,
const
string
& aPrefix )
override
;
101
102
//------------------------------------------------------------------------------
103
104
/*real
105
dIdV() const ;*/
106
107
//------------------------------------------------------------------------------
108
109
};
110
111
inline
ComponentType
112
FEMTwoTerminals::component_type
()
const
113
{
114
return
ComponentType::TERMINALPAIR
;
115
}
116
117
//-----------------------------------------------------------------------------
118
}
119
}
120
121
#endif
//BELFEM_CL_FEMTWOTERMINALS_HPP
Component_Enums.hpp
cl_BDF.hpp
cl_TwoTerminals.hpp
cl_Vector.hpp
belfem::ShiftRegister< real >
belfem::electronics::FEMTwoTerminals::set_IV
void set_IV(const real I, const real V)
Definition
cl_FEMTwoTerminals.cpp:56
belfem::electronics::FEMTwoTerminals::load_state
void load_state(hid_t aGroup, const string &aPrefix) override
restore the state written by save_state().
Definition
cl_FEMTwoTerminals.cpp:81
belfem::electronics::FEMTwoTerminals::save_state
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_FEMTwoTerminals.cpp:66
belfem::electronics::FEMTwoTerminals::compute_current
void compute_current() override
Definition
cl_FEMTwoTerminals.cpp:28
belfem::electronics::FEMTwoTerminals::FEMTwoTerminals
FEMTwoTerminals(Cell< ElectricNode * > &aTerminals, string aLabel="")
Order.
Definition
cl_FEMTwoTerminals.cpp:21
belfem::electronics::FEMTwoTerminals::shift_back
void shift_back() override
Definition
cl_FEMTwoTerminals.cpp:46
belfem::electronics::FEMTwoTerminals::component_type
ComponentType component_type() const override
Definition
cl_FEMTwoTerminals.hpp:112
belfem::electronics::FEMTwoTerminals::shift
void shift(const real aTime, const real aDeltaTime) override
Definition
cl_FEMTwoTerminals.cpp:36
belfem::electronics::TwoTerminals::TwoTerminals
TwoTerminals(Cell< ElectricNode * > &aTerminals, string aLabel="")
Definition
cl_TwoTerminals.cpp:20
belfem::ode::BDF
Definition
cl_BDF.hpp:26
belfem::electronics
Definition
cl_Capacitor.cpp:18
belfem::electronics::ComponentType
ComponentType
Definition
Component_Enums.hpp:22
belfem::electronics::ComponentType::TERMINALPAIR
@ TERMINALPAIR
Definition
Component_Enums.hpp:31
belfem
USER GUIDES:
Definition
cl_Capacitor.cpp:16
belfem::hid_t
int hid_t
Definition
hdf5_types.hpp:20
belfem::real
double real
Definition
typedefs.hpp:36
src
circuit
cl_FEMTwoTerminals.hpp
Generated by
1.18.0