(9)

Class to compute the magnetic induction from the current density using the Biot-Savart formula. More...

Public Member Functions

 BiotSavart ()
 Default constructor.
 
 BiotSavart (Mesh &ms)
 Constructor using mesh data. More...
 
 BiotSavart (Mesh &ms, const Vect< real_t > &J, Vect< real_t > &B, int code=0)
 Constructor using mesh and vector of real current density. More...
 
 BiotSavart (Mesh &ms, const Vect< complex_t > &J, Vect< complex_t > &B, int code=0)
 Constructor using mesh and vector of complex current density. More...
 
 ~BiotSavart ()
 Destructor.
 
void setCurrentDensity (const Vect< real_t > &J)
 Set (real) current density given at elements. More...
 
void setCurrentDensity (const Vect< complex_t > &J)
 Set (real) current density given at elements. More...
 
void setMagneticInduction (Vect< real_t > &B)
 Transmit (real) magnetic induction vector given at nodes. More...
 
void setMagneticInduction (Vect< complex_t > &B)
 Transmit (complex) magnetic induction vector given at nodes. More...
 
void selectCode (int code)
 Choose code of faces or edges at which current density is given.
 
void setPermeability (real_t mu)
 Set the magnetic permeability coefficient. More...
 
void setBoundary ()
 Choose to compute the magnetic induction at boundary nodes only. More...
 
Point< real_tgetB3 (Point< real_t > x)
 Compute the real magnetic induction at a given point using the volume Biot-Savart formula. More...
 
Point< real_tgetB2 (Point< real_t > x)
 Compute the real magnetic induction at a given point using the surface Biot-Savart formula. More...
 
Point< real_tgetB1 (Point< real_t > x)
 Compute the real magnetic induction at a given point using the line Biot-Savart formula. More...
 
Point< complex_tgetBC3 (Point< real_t > x)
 Compute the complex magnetic induction at a given point using the volume Biot-Savart formula. More...
 
Point< complex_tgetBC2 (Point< real_t > x)
 Compute the complex magnetic induction at a given point using the surface Biot-Savart formula. More...
 
Point< complex_tgetBC1 (Point< real_t > x)
 Compute the complex magnetic induction at a given point using the line Biot-Savart formula. More...
 
int run ()
 Run the calculation by the Biot-Savart formula. More...
 

Detailed Description

Class to compute the magnetic induction from the current density using the Biot-Savart formula.

Given a current density vector given at elements, a collection of sides of edges (piecewise constant), this class enables computing the magnetic induction vector (continuous and piecewise linear) using the Ampere equation. This magnetic induction is obtained by using the Biot-Savart formula which can be either a volume, surface or line formula depending on the nature of the current density vector.

Author
Rachid Touzani

Constructor & Destructor Documentation

◆ BiotSavart() [1/3]

BiotSavart ( Mesh ms)

Constructor using mesh data.

Parameters
[in]msMesh instance

◆ BiotSavart() [2/3]

BiotSavart ( Mesh ms,
const Vect< real_t > &  J,
Vect< real_t > &  B,
int  code = 0 
)

Constructor using mesh and vector of real current density.

The current density is assumed piecewise constant

Parameters
[in]msMesh instance
[in]JSidewise vector of current density (J is a real valued vector), in the case of a surface supported current
[in]BNodewise vector that contains, once the member function run is used, the magnetic induction
[in]codeOnly sides with given code support current [Default: 0]

◆ BiotSavart() [3/3]

BiotSavart ( Mesh ms,
const Vect< complex_t > &  J,
Vect< complex_t > &  B,
int  code = 0 
)

Constructor using mesh and vector of complex current density.

The current density is assumed piecewise constant

Parameters
[in]msMesh instance
[in]JSidewise vector of current density (J is a complex valued vector), in the case of a surface supported current
[in]BNodewise vector that contains, once the member function run is used, the magnetic induction
[in]codeOnly sides with given code support current [Default: 0]

Member Function Documentation

◆ getB1()

Point<real_t> getB1 ( Point< real_t x)

Compute the real magnetic induction at a given point using the line Biot-Savart formula.

This function computes a real valued magnetic induction for a real valued current density field

Parameters
[in]xCoordinates of point at which the magnetic induction is computed
Returns
Value of the magnetic induction at x

◆ getB2()

Point<real_t> getB2 ( Point< real_t x)

Compute the real magnetic induction at a given point using the surface Biot-Savart formula.

This function computes a real valued magnetic induction for a real valued current density field

Parameters
[in]xCoordinates of point at which the magnetic induction is computed
Returns
Value of the magnetic induction at x

◆ getB3()

Point<real_t> getB3 ( Point< real_t x)

Compute the real magnetic induction at a given point using the volume Biot-Savart formula.

This function computes a real valued magnetic induction for a real valued current density field

Parameters
[in]xCoordinates of point at which the magnetic induction is computed
Returns
Value of the magnetic induction at x

◆ getBC1()

Point<complex_t> getBC1 ( Point< real_t x)

Compute the complex magnetic induction at a given point using the line Biot-Savart formula.

This function computes a complex valued magnetic induction for a complex valued current density field

Parameters
[in]xCoordinates of point at which the magnetic induction is computed
Returns
Value of the magnetic induction at x

◆ getBC2()

Point<complex_t> getBC2 ( Point< real_t x)

Compute the complex magnetic induction at a given point using the surface Biot-Savart formula.

This function computes a complex valued magnetic induction for a complex valued current density field

Parameters
[in]xCoordinates of point at which the magnetic induction is computed
Returns
Value of the magnetic induction at x

◆ getBC3()

Point<complex_t> getBC3 ( Point< real_t x)

Compute the complex magnetic induction at a given point using the volume Biot-Savart formula.

This function computes a complex valued magnetic induction for a complex valued current density field

Parameters
[in]xCoordinates of point at which the magnetic induction is computed
Returns
Value of the magnetic induction at x

◆ run()

int run ( )

Run the calculation by the Biot-Savart formula.

This function computes the magnetic induction, which is stored in the vector B given in the constructor

◆ setBoundary()

void setBoundary ( )

Choose to compute the magnetic induction at boundary nodes only.

By default the magnetic induction is computed (using the function run) at all mesh nodes

Note
This function has no effect for surface of line Biot-Savart formula

◆ setCurrentDensity() [1/2]

void setCurrentDensity ( const Vect< real_t > &  J)

Set (real) current density given at elements.

The current density is assumed piecewise constant and real valued. This function can be used in the case of the volume Biot-Savart formula.

Parameters
[in]JCurrent density vector (Vect instance) and real entries

◆ setCurrentDensity() [2/2]

void setCurrentDensity ( const Vect< complex_t > &  J)

Set (real) current density given at elements.

The current density is assumed piecewise constant and complex valued. This function can be used in the case of the volume Biot-Savart formula.

Parameters
[in]JCurrent density vector (Vect instance) of complex entries

◆ setMagneticInduction() [1/2]

void setMagneticInduction ( Vect< real_t > &  B)

Transmit (real) magnetic induction vector given at nodes.

Parameters
[out]BMagnetic induction vector (Vect instance) and real entries

◆ setMagneticInduction() [2/2]

void setMagneticInduction ( Vect< complex_t > &  B)

Transmit (complex) magnetic induction vector given at nodes.

Parameters
[out]BMagnetic induction vector (Vect instance) and complex entries

◆ setPermeability()

void setPermeability ( real_t  mu)

Set the magnetic permeability coefficient.

Parameters
[in]muMagnetic permeability