# farFieldBC

Absorbing boundary condition for harmonic electromagnetic analysis

Since R2023a

## Description

A `farFieldBC` object specifies the thickness of an absorbing region as well as the exponent and scaling parameter defining the attenuation rate of the waves entering the absorbing region. `edgeBC` and `faceBC` objects contain `farFieldBC` objects in their `FarField` property.

## Creation

### Syntax

``ffbc = farFieldBC(Name=Value)``

### Description

example

````ffbc = farFieldBC(Name=Value)` creates a `farFieldBC` object and sets properties using one or more name-value arguments. You must specify the thickness value. Specifying the exponent and scaling values is optional.```

## Properties

expand all

Width of the far field absorbing region, specified as a positive number. The solver uses an absorbing boundary condition for a harmonic analysis.

Data Types: `double`

Exponent defining the attenuation rate of the waves entering the absorbing region, specified as a positive number. The solver uses an absorbing boundary condition for a harmonic analysis.

Data Types: `double`

Scaling parameter defining the attenuation rate of the waves entering the absorbing region, specified as a positive number. The solver uses an absorbing boundary condition for a harmonic analysis.

Data Types: `double`

## Examples

collapse all

Specify an absorbing boundary condition for an `femodel` object representing a harmonic electromagnetic problem.

Create an `femodel` object for solving a harmonic electromagnetic problem with an electric field type. Assign a geometry representing a 2-D plate with a hole to the model.

```model = femodel(AnalysisType="electricHarmonic", ... Geometry="PlateHolePlanar.stl");```

Plot the geometry with the edge labels.

```pdegplot(model.Geometry,EdgeLabels="on"); xlim([-1 11]) ylim([-1 21])```

Specify an electric field on the circular edge.

```model.EdgeBC(5) = edgeBC(ElectricField=[10 0]); model.EdgeBC```
```ans = 1x5 edgeBC array Properties for analysis type: electricHarmonic Index ElectricField FarField 1 [] [] 2 [] [] 3 [] [] 4 [] [] 5 [10 0] [] Show all properties ```

Specify absorbing regions with a thickness of 2 on the edges of the rectangle. Use the default attenuation rate for the absorbing regions.

```ffbc = farFieldBC(Thickness=2); model.EdgeBC(1:4) = edgeBC(FarField=ffbc); model.EdgeBC```
```ans = 1x5 edgeBC array Properties for analysis type: electricHarmonic Index ElectricField FarField 1 [] [1x1 farFieldBC] 2 [] [1x1 farFieldBC] 3 [] [1x1 farFieldBC] 4 [] [1x1 farFieldBC] 5 [10 0] [] Show all properties ```

Check the parameters of the absorbing region for edge 1.

`model.EdgeBC(1).FarField`
```ans = farFieldBC with properties: Thickness: 2 Exponent: 4 Scaling: 5 ```

Now specify the attenuation rate for the absorbing regions.

```ffbc = farFieldBC(Thickness=2,Exponent=3,Scaling=100); model.EdgeBC(1:4) = edgeBC(FarField=ffbc); model.EdgeBC(1).FarField```
```ans = farFieldBC with properties: Thickness: 2 Exponent: 3 Scaling: 100 ```

Specify an absorbing boundary condition for an `femodel` object representing a harmonic electromagnetic problem.

Create an `femodel` object for solving a harmonic electromagnetic problem with an electric field type. Assign a geometry representing a 3-D plate with a hole to the model.

```model = femodel(AnalysisType="electricHarmonic", ... Geometry="PlateHoleSolid.stl");```

Plot the geometry with the face labels.

```pdegplot(model.Geometry,FaceLabels="on", ... FaceAlpha=0.4);```

Specify the electric field on the circular face.

```model.FaceBC(7) = faceBC(ElectricField=[10 0 0]); model.FaceBC```
```ans = 1x7 faceBC array Properties for analysis type: electricHarmonic Index ElectricField FarField 1 [] [] 2 [] [] 3 [] [] 4 [] [] 5 [] [] 6 [] [] 7 [10 0 0] [] Show all properties ```

Specify absorbing regions with a thickness of 2 on the sides of the plate. Use the default attenuation rate for the absorbing regions.

```ffbc = farFieldBC(Thickness=2); model.FaceBC(3:6) = faceBC(FarField=ffbc); model.FaceBC```
```ans = 1x7 faceBC array Properties for analysis type: electricHarmonic Index ElectricField FarField 1 [] [] 2 [] [] 3 [] [1x1 farFieldBC] 4 [] [1x1 farFieldBC] 5 [] [1x1 farFieldBC] 6 [] [1x1 farFieldBC] 7 [10 0 0] [] Show all properties ```

Check the parameters of the absorbing region for face 6.

`model.FaceBC(6).FarField`
```ans = farFieldBC with properties: Thickness: 2 Exponent: 4 Scaling: 5 ```

Now specify the attenuation rate for the absorbing regions.

```ffbc = farFieldBC(Thickness=2,Exponent=3,Scaling=100); model.FaceBC(3:6) = faceBC(FarField=ffbc); model.FaceBC(6).FarField```
```ans = farFieldBC with properties: Thickness: 2 Exponent: 3 Scaling: 100 ```

## Version History

Introduced in R2023a