BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
mt_maxwell_h.hpp
Go to the documentation of this file.
1//
2// Created by christian on 10/23/24.
3//
4
5#ifndef MT_MAXWELL_H_HPP
6#define MT_MAXWELL_H_HPP
7
8#include "typedefs.hpp"
9#include "constants.hpp"
10#include "globals.hpp"
11
12#include "cl_Vector.hpp"
13#include "cl_Matrix.hpp"
14
15#include "cl_FEM_Element.hpp"
16#include "cl_FEM_Calculator.hpp"
18
19
20namespace belfem
21{
22 namespace fem
23 {
24 namespace maxwell
25 {
26 inline void
27 save_resistivity( Calculator * aCalc , const real aRhoM )
28 {
29 aCalc->mesh()->field_data( "element_rho" )( aCalc->element()->element()->index() ) = aRhoM ;
30 }
31
32 // ohmic dissipation of one element, added into the mesh-wide
33 // "dotQ" global. This is a POWER in watts ( rho |j|^2 dV ), not an
34 // energy: an AC loss per cycle is the time integral of it, which
35 // nothing in the tree takes. The global is zeroed before every
36 // assembly by Controller::reset_dotQ(), so what reaches the Exodus
37 // file is the value from that timestep's LAST assembly
38 inline void
39 save_dotQ( Calculator * aCalc , const real aDotQ )
40 {
41 aCalc->mesh()->global_variable( "dotQ" )->value() += aDotQ ;
42 }
43
44 inline real
46 {
47 return std::clamp( aCalc->mesh()->field_data( "element_rho" )
48 ( aIndex == BELFEM_UINT_MAX ? aCalc->element()->element()->index() : aIndex ), gRhoMin, gRhoMax );
49 }
50
62 void
63 h_picard( Calculator * aCalc, TimestepMatrices * aMatrices );
64
65 void
66 h_newton_mu0( Calculator * aCalc, TimestepMatrices * aMatrices );
67
68 void
69 h_newton_mu( Calculator * aCalc, TimestepMatrices * aMatrices );
70
74 void
75 h_ghost( Calculator * aCalc, TimestepMatrices * aMatrices );
76
77 void
78 h_side_connector( Calculator * aCalc, TimestepMatrices * aMatrices );
79
80 void
82 }
83 }
84}
85
86#endif //MT_MAXWELL_H_HPP
Vector< real > & field_data(const string &aLabel)
Definition cl_Mesh.hpp:1504
mesh::GlobalVariable * global_variable(const id_t aID)
Definition cl_Mesh.hpp:1523
Definition cl_FEM_Calculator.hpp:600
Element * element()
Definition cl_FEM_Calculator.hpp:2431
Mesh * mesh()
Definition cl_FEM_Calculator.hpp:2519
mesh::Element * element()
expose the underlying element on the mesh
Definition cl_FEM_Element.hpp:576
Container for element-level DENSE matrices in transient nonlinear FEM.
Definition cl_TimestepMatrices.hpp:71
virtual index_t index() const
Definition cl_Graph_Vertex.hpp:234
real & value()
Definition cl_Mesh_GlobalVariable.hpp:89
Definition cl_EF_PENTA6TS.hpp:23
void h_side_connector(Calculator *aCalc, TimestepMatrices *aMatrices)
Definition mt_maxwell_h.cpp:340
void h_newton_mu(Calculator *aCalc, TimestepMatrices *aMatrices)
Definition mt_maxwell_h.cpp:230
void h_picard(Calculator *aCalc, TimestepMatrices *aMatrices)
Collapsed h-kernels: all per-point material math is delegated to aCalc->maxwell(),...
Definition mt_maxwell_h.cpp:117
void save_resistivity(Calculator *aCalc, const real aRhoM)
Definition mt_maxwell_h.hpp:27
void save_dotQ(Calculator *aCalc, const real aDotQ)
Definition mt_maxwell_h.hpp:39
void h_side_connector_newton(Calculator *aCalc, TimestepMatrices *aMatrices)
Definition mt_maxwell_h.cpp:381
void h_ghost(Calculator *aCalc, TimestepMatrices *aMatrices)
facet-based thin-shell interface / stabilization kernel
Definition mt_maxwell_h.cpp:429
void h_newton_mu0(Calculator *aCalc, TimestepMatrices *aMatrices)
Definition mt_maxwell_h.cpp:159
real get_resistivity(Calculator *aCalc, const index_t aIndex=BELFEM_UINT_MAX)
Definition mt_maxwell_h.hpp:45
Definition cl_IFB_LINE3.hpp:21
USER GUIDES:
Definition cl_Capacitor.cpp:16
greal gRhoMin
minimim resistrivity in Ohm*m, default: 0
Definition globals.hpp:48
greal gRhoMax
maximim resistrivity in Ohm*m, default: 1e10
Definition globals.hpp:51
uint32_t index_t
Definition typedefs.hpp:52
double real
Definition typedefs.hpp:36
#define BELFEM_UINT_MAX
Definition typedefs.hpp:80