BELFEM
0.9.0
Berkeley Lab Finite Element Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
cl_VoltageSource.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_VOLTAGESOURCE_HPP
13
#define BELFEM_CL_VOLTAGESOURCE_HPP
14
15
16
#include "
cl_TwoTerminals.hpp
"
17
#include "
cl_SourceFunction.hpp
"
18
19
namespace
belfem
20
{
21
namespace
electronics
22
{
23
//-----------------------------------------------------------------------------
24
25
class
VoltageSource
:
public
TwoTerminals
26
{
27
29
real
mValueTime = 0.0 ;
30
32
SourceFunction
* mFunction ;
33
34
//------------------------------------------------------------------------------
35
public
:
36
//------------------------------------------------------------------------------
37
38
VoltageSource
(
SourceFunction
* aFunction, Cell < ElectricNode* > & aTerminals,
string
aLabel =
""
) ;
39
40
~VoltageSource
()
override
;
41
42
//------------------------------------------------------------------------------
43
44
ComponentType
45
component_type
()
const override
;
46
47
//-----------------------------------------------------------------------------
48
49
real
50
get_value
()
const override
;
51
52
//-----------------------------------------------------------------------------
53
54
void
55
set_value
(
const
real
aValue ) ;
56
57
//-----------------------------------------------------------------------------
58
59
void
60
shift
(
const
real
aTime,
const
real
aDeltaTime )
override
;
61
62
//------------------------------------------------------------------------------
63
64
void
65
save_state
(
hid_t
aGroup,
const
string
& aPrefix )
override
;
66
67
//------------------------------------------------------------------------------
68
69
void
70
load_state
(
hid_t
aGroup,
const
string
& aPrefix )
override
;
71
72
//------------------------------------------------------------------------------
73
74
75
};
76
77
inline
ComponentType
78
VoltageSource::component_type
()
const
79
{
80
return
ComponentType::VOLTAGESOURCE
;
81
}
82
83
//-----------------------------------------------------------------------------
84
}
85
}
86
87
#endif
//BELFEM_CL_VOLTAGESOURCE_HPP
cl_SourceFunction.hpp
cl_TwoTerminals.hpp
belfem::SourceFunction
Definition
cl_SourceFunction.hpp:80
belfem::electronics::TwoTerminals::TwoTerminals
TwoTerminals(Cell< ElectricNode * > &aTerminals, string aLabel="")
Definition
cl_TwoTerminals.cpp:20
belfem::electronics::VoltageSource::component_type
ComponentType component_type() const override
Definition
cl_VoltageSource.hpp:78
belfem::electronics::VoltageSource::shift
void shift(const real aTime, const real aDeltaTime) override
Definition
cl_VoltageSource.cpp:54
belfem::electronics::VoltageSource::set_value
void set_value(const real aValue)
Definition
cl_VoltageSource.cpp:46
belfem::electronics::VoltageSource::get_value
real get_value() const override
Definition
cl_VoltageSource.cpp:38
belfem::electronics::VoltageSource::load_state
void load_state(hid_t aGroup, const string &aPrefix) override
restore the state written by save_state().
Definition
cl_VoltageSource.cpp:73
belfem::electronics::VoltageSource::VoltageSource
VoltageSource(SourceFunction *aFunction, Cell< ElectricNode * > &aTerminals, string aLabel="")
Definition
cl_VoltageSource.cpp:24
belfem::electronics::VoltageSource::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_VoltageSource.cpp:62
belfem::electronics
Definition
cl_Capacitor.cpp:18
belfem::electronics::ComponentType
ComponentType
Definition
Component_Enums.hpp:22
belfem::electronics::ComponentType::VOLTAGESOURCE
@ VOLTAGESOURCE
Definition
Component_Enums.hpp:26
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_VoltageSource.hpp
Generated by
1.18.0