Eddy2D_geometries.hh

Go to the documentation of this file.
1 
7 #ifndef Eddy2D_geometries_hh
8 #define Eddy2D_geometries_hh
9 
10 #include <set>
11 #include "toolbox/inputOutput.hh"
12 #include "toolbox/inputParam.hh"
13 #include "toolbox/set.hh"
15 #include "geometry/mesh.hh"
16 #include "geometry/formula.hh"
17 #include "geometry/circle.hh"
18 #include "maxwellConstants.hh"
19 
20 namespace concepts {
21 
22  // ******************************************************** EddyGeometry2D **
23 
29  class EddyGeometry2D : public OutputOperator {
30  public:
36  EddyGeometry2D(const std::string meshAbbr, const Real sigma0 = 0.0)
37  : sigma_(sigma0), meshAbbr_(meshAbbr) {}
38  virtual ~EddyGeometry2D() {}
40  virtual Mesh2& mesh() = 0;
46  virtual const PiecewiseFormulaBase<Real>* J0x() const = 0;
48  virtual const PiecewiseFormulaBase<Real>* J0y() const = 0;
50  virtual const PiecewiseFormulaBase<Real2d>* J0() const = 0;
53  const PiecewiseConstFormula<Real>& sigma() const { return sigma_;}
54  void meshAbbreviation(const char* meshAbbr) { meshAbbr_ = meshAbbr; }
55  const std::string meshAbbreviation() const { return meshAbbr_; }
57  virtual void dataout(concepts::InOutParameters& output);
58  protected:
59  virtual std::ostream& info(std::ostream& os) const;
65  std::string meshAbbr_;
66  };
67 
68  // ********************************************** EddyGeometry2DRotational **
69 
75  public:
86  const std::set<uint> conductive,
87  const std::set<uint> coil,
88  const Real j0 = 1.0,
89  const Real sigma = SIGMA_CU,
90  const Real sigma0 = 0.0);
102  const std::set<uint> conductive,
103  const std::set<uint> coil,
104  const Real j0 = 1.0,
105  const Real sigma = SIGMA_CU,
106  const Real sigma0 = 0.0);
108  virtual Mesh2& mesh() { return *msh_; }
110  virtual const PiecewiseFormulaBase<Real>* J0x() const { return &J0x_; }
112  virtual const PiecewiseFormulaBase<Real>* J0y() const { return &J0y_; }
114  virtual const PiecewiseFormulaBase<Real2d>* J0() const { return 0; }
116  virtual void dataout(concepts::InOutParameters& output);
117  protected:
118  virtual std::ostream& info(std::ostream& os) const;
119  private:
121  std::unique_ptr<Mesh2> msh_;
125  const Real j0_;
129  const std::set<uint> conductive_;
131  const std::set<uint> coil_;
132  };
133 
134  // ********************************************** EddyGeometry2DRectImport **
135 
141  public:
160  EddyGeometry2DRectImport(const std::string coord, const std::string elms,
161  const std::string attributes,
162  const uint idxStart = 1,
163  const std::string meshAbbr = "",
164  const Real j0 = 1.0,
165  const Real sigma = SIGMA_CU,
166  const Real sigma0 = 0.0);
185  EddyGeometry2DRectImport(const std::string path,
186  const std::string meshAbbr,
187  const Real j0 = 1.0,
188  const Real sigma = SIGMA_CU,
189  const Real sigma0 = 0.0);
190  virtual Mesh2& mesh() { return *msh_; }
192  virtual const PiecewiseFormulaBase<Real>* J0x() const { return 0; }
194  virtual const PiecewiseFormulaBase<Real>* J0y() const { return 0; }
196  virtual const PiecewiseFormulaBase<Real2d>* J0() const { return &J0_; }
198  virtual void dataout(concepts::InOutParameters& output);
199  protected:
200  virtual std::ostream& info(std::ostream& os) const;
201  private:
203  std::unique_ptr<Mesh2> msh_;
207  const Real j0_;
209  const std::string coord_, elms_, attr_;
210  };
211 
212  // ******************************************** EddyGeometry2DRotateImport **
213 
219  public:
239  EddyGeometry2DRotateImport(const std::string coord, const std::string elms,
240  const std::string attributes,
241  const std::string edgRadia,
242  const uint idxStart = 1,
243  const std::string meshAbbr = "",
244  const Real j0 = 1.0,
245  const Real sigma = SIGMA_CU,
246  const Real sigma0 = 0.0);
247  virtual Mesh2& mesh() { return *msh_; }
249  virtual const PiecewiseFormulaBase<Real>* J0x() const { return &J0x_; }
251  virtual const PiecewiseFormulaBase<Real>* J0y() const { return &J0y_; }
253  virtual const PiecewiseFormulaBase<Real2d>* J0() const { return &J0_; }
255  virtual void dataout(concepts::InOutParameters& output);
256  protected:
257  virtual std::ostream& info(std::ostream& os) const;
258  private:
260  std::unique_ptr<Mesh2> msh_;
266  const Real j0_;
268  const std::string coord_, elms_, attr_, edgRadia_;
269  };
270 
271  // ************************************************* InputEddy2DGeometries **
272 
278  public:
286  const Real sigma = SIGMA_CU, const Real sigma0 = 0);
290  virtual std::ostream& letters(std::ostream& os) const;
292  virtual std::ostream& arguments(std::ostream& os) const;
294  virtual std::ostream& description(std::ostream& os) const;
299  virtual int input(int opt, const char* optarg);
300  protected:
301  virtual std::ostream& info(std::ostream& os) const;
302  };
303 
304 } // namespace concepts
305 
306 #endif // Eddy2D_geometries_hh
virtual void dataout(concepts::InOutParameters &output)
writes information to output object
EddyGeometry2DRectImport(const std::string path, const std::string meshAbbr, const Real j0=1.0, const Real sigma=SIGMA_CU, const Real sigma0=0.0)
Constructor.
virtual const PiecewiseFormulaBase< Real > * J0x() const
piecewise defined formula
EddyGeometry2DRotational(const Array< Real > r, const std::set< uint > conductive, const std::set< uint > coil, const Real j0=1.0, const Real sigma=SIGMA_CU, const Real sigma0=0.0)
Constructor.
const std::string coord_
files for the mesh
concepts::PiecewiseConstFormula< Real2d > J0_
piecewise defined source current
std::string meshAbbr_
Abbreviation for the mesh.
virtual const PiecewiseFormulaBase< Real > * J0x() const
piecewise defined formula
virtual void dataout(concepts::InOutParameters &output)
writes information to output object
const Real j0_
absolute value of source current density
concepts::PiecewiseFormula< Real > J0x_
piecewise defined source current density
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
EddyGeometry2DRectImport(const std::string coord, const std::string elms, const std::string attributes, const uint idxStart=1, const std::string meshAbbr="", const Real j0=1.0, const Real sigma=SIGMA_CU, const Real sigma0=0.0)
Constructor.
const std::string meshAbbreviation() const
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
Rotational symmetric geometry, conductivity and source current.
EddyGeometry2DRotational(const Array< Real > r, const Real ri, const std::set< uint > conductive, const std::set< uint > coil, const Real j0=1.0, const Real sigma=SIGMA_CU, const Real sigma0=0.0)
Constructor for.
Holds parameters in hashes.
Definition: inputOutput.hh:75
Abstract class for carrying information, which helps for reading input parameters from command line.
Definition: inputParam.hh:24
Rectangular geometry, source current.
concepts::PiecewiseFormula< Real > J0y_
virtual const PiecewiseFormulaBase< Real > * J0y() const =0
Piecewise defined formula.
InputEddy2DGeometries(concepts::InOutParameters &input, const Real sigma=SIGMA_CU, const Real sigma0=0)
Constructor.
PiecewiseConstFormula< Real > sigma_
Piecewise constant conductivity.
std::unique_ptr< Mesh2 > msh_
Mesh.
Set< uint > outerBoundary() const
Return the attributes of the outer boundary.
virtual void dataout(concepts::InOutParameters &output)
Writes information to output object.
virtual const PiecewiseFormulaBase< Real2d > * J0() const
piecewise defined formula
virtual const PiecewiseFormulaBase< Real > * J0x() const =0
Piecewise defined formula.
Geometry with rotational symmetric coil.
concepts::PiecewiseFormula< Real > J0y_
virtual const PiecewiseFormulaBase< Real2d > * J0() const
piecewise defined formula
virtual std::ostream & letters(std::ostream &os) const
Return letters for the arguments.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
PiecewiseConstFormula< Real > & sigma()
Piecewise constant conductivity.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
concepts::PiecewiseFormula< Real2d > J0_
piecewise defined source current density
std::unique_ptr< Mesh2 > msh_
Mesh.
Set< uint > innerBoundary() const
Return the attributes of the inner boundaries.
const Real j0_
absolute value of source current density in straight coil parts
virtual const PiecewiseFormulaBase< Real > * J0y() const
piecewise defined formula
An abstract class for 2D meshes.
Definition: mesh.hh:103
virtual const PiecewiseFormulaBase< Real2d > * J0() const =0
Piecewise defined formula.
void meshAbbreviation(const char *meshAbbr)
EddyGeometry2DRotateImport(const std::string coord, const std::string elms, const std::string attributes, const std::string edgRadia, const uint idxStart=1, const std::string meshAbbr="", const Real j0=1.0, const Real sigma=SIGMA_CU, const Real sigma0=0.0)
Constructor.
virtual const PiecewiseFormulaBase< Real > * J0y() const
piecewise defined formula
const std::set< uint > coil_
number of rings, which are the coil, first is 0
std::unique_ptr< Mesh2 > msh_
Mesh.
virtual std::ostream & arguments(std::ostream &os) const
Returns argument list as string.
EddyGeometry2D(const std::string meshAbbr, const Real sigma0=0.0)
Constructor.
const Real SIGMA_CU
const std::set< uint > conductive_
number of rings, which are conductive, first is 0
const PiecewiseConstFormula< Real > & sigma() const
virtual std::ostream & description(std::ostream &os) const
Returns description for help.
virtual const PiecewiseFormulaBase< Real > * J0x() const
piecewise defined formula
virtual void dataout(concepts::InOutParameters &output)
writes information to output object
virtual const PiecewiseFormulaBase< Real > * J0y() const
piecewise defined formula
Helps for reading input parameters for Eddy2D geometries.
const Real j0_
absolute value of source current density
virtual Mesh2 & mesh()=0
Mesh.
Set< uint > outerBoundary_
Attributes of outer and inner boundaries.
Array< Real > r_
radia of the rings
Abstract class for holding geometry and material for eddy current problems.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
const std::string coord_
files for the mesh
Class providing an output operator.
concepts::PiecewiseFormula< Real > J0x_
piecewise defined source current density
virtual const PiecewiseFormulaBase< Real2d > * J0() const
piecewise defined formula
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
virtual int input(int opt, const char *optarg)
Process an argument and sets input parameter, if found.
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich