FEMTIC
Forward2DSquareElementNodeBased.h
Go to the documentation of this file.
1 //-------------------------------------------------------------------------------------------------------
2 // The MIT License (MIT)
3 //
4 // Copyright (c) 2021 Yoshiya Usui
5 //
6 // Permission is hereby granted, free of charge, to any person obtaining a copy
7 // of this software and associated documentation files (the "Software"), to deal
8 // in the Software without restriction, including without limitation the rights
9 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 // copies of the Software, and to permit persons to whom the Software is
11 // furnished to do so, subject to the following conditions:
12 //
13 // The above copyright notice and this permission notice shall be included in all
14 // copies or substantial portions of the Software.
15 //
16 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 // SOFTWARE.
23 //-------------------------------------------------------------------------------------------------------
24 #ifndef DBLDEF_FORWARD_2D_SQUARE_ELEMENT_NODE_BASED
25 #define DBLDEF_FORWARD_2D_SQUARE_ELEMENT_NODE_BASED
26 
27 #include "MeshDataBrickElement.h"
28 #include "Forward2DSquareElement.h"
29 
30 // Class of 2D forward calculation by using square node element
32 
33 public:
34 
35  // Constructer
36  explicit Forward2DSquareElementNodeBased( const int planeID, const int iPol );
37 
38  // Destructer
40 
41  // Calculate EM fields of boundary planes by 2D forward calculcation
42  virtual void calcEMFieldsOfBoundaryPlanes( const double freq, const MeshDataBrickElement* const pMeshDataBrickElement ) = 0;
43 
45  //virtual std::complex<double> getElectricFieldPerpendicularToPlane( const int iElem, const double wLocal, const double hLocal ) const = 0;
46 
47 protected:
48 
49  // Calculate parameter Eta of Rodi(1976)
50  std::complex<double> calcEta( const int imode, const double freq, const int iElem ) const;
51 
52  // Calculate parameter Gamma of Rodi(1976)
53  std::complex<double> calcGamma( const int imode, const double freq, const int iElem ) const;
54 
55  // Local coordinate of vertical direction on top side
56  static const double m_hLocalTopSide;
57 
58  // Local coordinate of vertical direction on bottom side
59  static const double m_hLocalBottomSide;
60 
61  // Calculate Ex
62  virtual std::complex<double> calcEx( const int iElem, const double wCoord, const double hCoord, const MeshDataBrickElement* const pMeshDataBrickElement ) const;
63 
64  // Calculate Ey
65  virtual std::complex<double> calcEy( const int iElem, const double wCoord, const double hCoord, const MeshDataBrickElement* const pMeshDataBrickElement ) const;
66 
67  // Calculate Ez
68  virtual std::complex<double> calcEz( const int iElem, const double wCoord, const double hCoord, const MeshDataBrickElement* const pMeshDataBrickElement ) const;
69 
70  // Calculate Hx
71  virtual std::complex<double> calcHx( const double freq, const int iElem, const double wCoord, const double hCoord, const MeshDataBrickElement* const pMeshDataBrickElement ) const;
72 
73  // Calculate Hy
74  virtual std::complex<double> calcHy( const double freq, const int iElem, const double wCoord, const double hCoord, const MeshDataBrickElement* const pMeshDataBrickElement ) const;
75 
76  // Calculate Hz
77  virtual std::complex<double> calcHz( const double freq, const int iElem, const double wCoord, const double hCoord, const MeshDataBrickElement* const pMeshDataBrickElement ) const;
78 
79 private:
80 
81  // Defailt constructer
83 
84  // Copy constructer
86 
87  // Copy assignment operator
89 
90  // Calculate parameter V of Rodi(1976)
91  virtual std::complex<double> calcValueV( const double freq, const int iElem, const double wLocal, const double hLocal, const MeshDataBrickElement* const pMeshDataBrickElement ) const = 0;
92 
93  // Calculate parameter J of Rodi(1976)
94  virtual std::complex<double> calcValueJ( const double freq, const int iElem, const double wLocal, const double hLocal, const MeshDataBrickElement* const pMeshDataBrickElement ) const = 0;
95 
96  // Calculate parameter I of Rodi(1976)
97  virtual std::complex<double> calcValueI( const double freq, const int iElem, const double wLocal, const double hLocal, const MeshDataBrickElement* const pMeshDataBrickElement ) const = 0;
98 
99  // Calculate electric field perpendicular to the boundary plane
100  virtual std::complex<double> calcValueElectricFieldPerpendicular( const int iElem, const double wCoord, const double hCoord ) const = 0;
101 
102  // Calculate horizontal magnetic field
103  virtual std::complex<double> calcValueMagneticFieldHorizontal( const double freq, const int iElem, const double wCoord, const double hCoord, const MeshDataBrickElement* const pMeshDataBrickElement ) const = 0;
104 
105  // Calculate vertical magnetic field
106  virtual std::complex<double> calcValueMagneticFieldVertical( const double freq, const int iElem, const double wCoord, const double hCoord, const MeshDataBrickElement* const pMeshDataBrickElement ) const = 0;
107 
108 };
109 
110 #endif
Definition: Forward2DSquareElementNodeBased.h:31
virtual std::complex< double > calcHy(const double freq, const int iElem, const double wCoord, const double hCoord, const MeshDataBrickElement *const pMeshDataBrickElement) const
Definition: Forward2DSquareElementNodeBased.cpp:153
virtual std::complex< double > calcHx(const double freq, const int iElem, const double wCoord, const double hCoord, const MeshDataBrickElement *const pMeshDataBrickElement) const
Definition: Forward2DSquareElementNodeBased.cpp:138
static const double m_hLocalBottomSide
Definition: Forward2DSquareElementNodeBased.h:59
virtual std::complex< double > calcValueV(const double freq, const int iElem, const double wLocal, const double hLocal, const MeshDataBrickElement *const pMeshDataBrickElement) const =0
virtual std::complex< double > calcEy(const int iElem, const double wCoord, const double hCoord, const MeshDataBrickElement *const pMeshDataBrickElement) const
Definition: Forward2DSquareElementNodeBased.cpp:116
~Forward2DSquareElementNodeBased()
Definition: Forward2DSquareElementNodeBased.cpp:46
Forward2DSquareElementNodeBased(const Forward2DSquareElementNodeBased &rhs)
virtual void calcEMFieldsOfBoundaryPlanes(const double freq, const MeshDataBrickElement *const pMeshDataBrickElement)=0
virtual std::complex< double > calcValueMagneticFieldVertical(const double freq, const int iElem, const double wCoord, const double hCoord, const MeshDataBrickElement *const pMeshDataBrickElement) const =0
virtual std::complex< double > calcHz(const double freq, const int iElem, const double wCoord, const double hCoord, const MeshDataBrickElement *const pMeshDataBrickElement) const
Definition: Forward2DSquareElementNodeBased.cpp:168
virtual std::complex< double > calcValueI(const double freq, const int iElem, const double wLocal, const double hLocal, const MeshDataBrickElement *const pMeshDataBrickElement) const =0
Forward2DSquareElementNodeBased & operator=(const Forward2DSquareElementNodeBased &rhs)
std::complex< double > calcGamma(const int imode, const double freq, const int iElem) const
Definition: Forward2DSquareElementNodeBased.cpp:84
virtual std::complex< double > calcValueMagneticFieldHorizontal(const double freq, const int iElem, const double wCoord, const double hCoord, const MeshDataBrickElement *const pMeshDataBrickElement) const =0
virtual std::complex< double > calcEz(const int iElem, const double wCoord, const double hCoord, const MeshDataBrickElement *const pMeshDataBrickElement) const
Definition: Forward2DSquareElementNodeBased.cpp:131
static const double m_hLocalTopSide
Definition: Forward2DSquareElementNodeBased.h:56
virtual std::complex< double > calcEx(const int iElem, const double wCoord, const double hCoord, const MeshDataBrickElement *const pMeshDataBrickElement) const
Definition: Forward2DSquareElementNodeBased.cpp:101
virtual std::complex< double > calcValueJ(const double freq, const int iElem, const double wLocal, const double hLocal, const MeshDataBrickElement *const pMeshDataBrickElement) const =0
std::complex< double > calcEta(const int imode, const double freq, const int iElem) const
Definition: Forward2DSquareElementNodeBased.cpp:54
virtual std::complex< double > calcValueElectricFieldPerpendicular(const int iElem, const double wCoord, const double hCoord) const =0
Definition: Forward2DSquareElement.h:31
Definition: MeshDataBrickElement.h:31