30 #ifndef _LibDEM_Prop_Electrical_HPP
31 #define _LibDEM_Prop_Electrical_HPP
51 virtual std::string
info()
const;
55 GRANOO_ACCESS (potential ,
double,
_potential );
68 void add_power(
double current,
double conductance);
80 template<
class Archive>
void serialize(Archive& ar,
const unsigned int );
97 template<
class Archive>
void
99 ar & boost::serialization::base_object< Core::Prop<Element> >(*this);
116 #include <boost/serialization/version.hpp>
120 GRANOO_CLASS_DECLARE_TPL(DEM::Electrical);
BOOST_CLASS_VERSION(GranOO3::DEM::Electrical, 1) namespace GranOO3
Definition: Electrical.hpp:117
Definition: SetOf.hpp:346
a property for adding electrical physics to DEM::Element
Definition: Electrical.hpp:44
bool _boundary_condition
A flag that tells whether the node is part of the boundary conditions.
Definition: Electrical.hpp:92
void serialize(Archive &ar, const unsigned int)
complete serializing of the instance in the *.gdd format
Definition: Electrical.hpp:98
double _potential
The electrical potential in the node.
Definition: Electrical.hpp:84
const bool is_boundary_condition() const
Definition: Electrical.cpp:103
bool _is_ground
A flag that tells whether the node is part of the ground terminal of the current source.
Definition: Electrical.hpp:93
double _leaving_current
The sum of all currents leaving the node.
Definition: Electrical.hpp:90
double _entering_current
The sum of all currents enterring the node.
Definition: Electrical.hpp:89
void clear_all_power()
Sets all powers to 0, namely the enterring and leaving powers.
Definition: Electrical.cpp:93
void add_current(double current)
Adds the contribution of a branch to the total current crossing the node, which is represented by a d...
Definition: Electrical.cpp:79
double _joule_power
Definition: Electrical.hpp:88
Electrical()
constructor
Definition: Electrical.cpp:48
void set_as_positive(bool activate)
Defines the attached discrete element as connected to the positive terminal of the voltage source.
Definition: Electrical.cpp:71
void add_power(double current, double conductance)
Adds the contribution of a branch to the electrical power crossing the node, given a current and cond...
Definition: Electrical.cpp:86
virtual ~Electrical()
destructor
Definition: Electrical.cpp:63
friend class boost::serialization::access
Definition: Electrical.hpp:79
double _total_power
The total power in the node computed as the average of the enterring and leaving powers.
Definition: Electrical.hpp:87
void clear_all_current()
Sets all currents to 0, namely the enterring and leaving currents.
Definition: Electrical.cpp:98
void compute_power()
Computes the total power in the node by averaging the enterring and leaving powers.
Definition: Electrical.cpp:66
double _leaving_power
The sum of all current powers leaving the node.
Definition: Electrical.hpp:86
const bool is_ground() const
Definition: Electrical.cpp:111
virtual std::string info() const
Definition: Electrical.cpp:115
double _electrical_conductivity
The electrical conductivity of the material.
Definition: Electrical.hpp:83
void set_as_ground(bool activate)
Defines the attached discrete element as connected to the ground terminal of the voltage source.
Definition: Electrical.cpp:75
double _entering_power
The sum of all current powers enterring the node.
Definition: Electrical.hpp:85
bool _is_positive
A flag that tells whether the node is part of the positive terminal of the current source.
Definition: Electrical.hpp:94
const bool is_positive() const
Definition: Electrical.cpp:107
Definition: Common.hpp:198