# PeriodicBoundary

The periodic boundary condition (PBC) for the model. PBCs are used to simulate structures that repeat to infinity. PBC is often used to simulate frequency selective surfaces (FSS) and infinite antenna arrays.

## Example

app = cf.GetApplication()
project = app:OpenFile(FEKO_HOME..
[[/shared/Resources/Automation/square_loop_antenna_MATCHED.cfx]])

-- Set up one dimensional periodic boundary condition for the model

properties = project.PeriodicBoundary:GetProperties()
properties.Dimension = cf.Enums.PeriodicBoundaryDimensionsEnum.OneDimension
properties.EndPointVectorOne.N = "0.0"
properties.EndPointVectorOne.U = "0.05"
properties.EndPointVectorOne.V = "-0.05"
properties.StartPoint.N = "0.0"
properties.StartPoint.U = "-0.05"
properties.StartPoint.V = "-0.05"
project.PeriodicBoundary:SetProperties(properties)

-- Increase the periodic boundary to two dimensions

properties = project.PeriodicBoundary:GetProperties()
properties.Dimension = cf.Enums.PeriodicBoundaryDimensionsEnum.TwoDimensions
properties.EndPointVectorTwo.N = "0"
properties.EndPointVectorTwo.U = "-0.05"
properties.EndPointVectorTwo.V = "0.05"
project.PeriodicBoundary:SetProperties(properties)

## Usage locations (object properties)

The following objects have properties using the PeriodicBoundary object:

## Property List

BeamSquintAngle
The beam pointing (squint) angle used to determine the phase shift. Only applicable if PhaseShiftMethod is FromSquintAngle. (Read only PeriodicBoundaryBeamSquintAngle)
Dimension
The PBC dimension type defining the number of periodic boundaries. The unit cell is repeated along the defined dimension type. (Read/Write PeriodicBoundaryDimensionsEnum)
EndPointVectorOne
The end point defining the first vector. Only applicable if the Dimension is OneDimension or TwoDimensions. (Read/Write LocalCoordinates)
EndPointVectorTwo
The end point defining the second vector. Only applicable if the Dimension is TwoDimensions. (Read/Write LocalCoordinates)
LocalWorkplane
The periodic boundary conditions workplane. (Read only LocalWorkplane)
PhaseShift
The phase shift in each vector direction. Only applicable if PhaseShiftMethod is SpecifyManually. (Read only PeriodicBoundaryPhaseShift)
PhaseShiftMethod
Defines the method for determining the phase shift of the source between one unit cell and the next when doing periodic boundary condition calculations. When a plane wave is used as source the phase difference between the cells cannot be specified, but is determined by the source. (Read/Write PeriodicBoundaryPhaseShiftMethodEnum)
StartPoint
The start point used for defining the vectors that define the periodicity. Only applicable if the Dimension is OneDimension or TwoDimensions. (Read/Write LocalCoordinates)
Type
The object type string. (Read only string)

## Method List

ClearDimensions ()
Clears the periodic boundary condition definition settings. This will set the Dimension to None.
GetProperties ()
Returns a table of properties representing the state of the object. The properties table can be used with the SetProperties method to change multiple properties of the object in one step. (Returns a table object.)
SetOneDimension (startpoint Coordinate, endpoint Coordinate)
Define a 1D periodic boundary condition. The start- and end-point of a single vector is required. Periodicity is then defined based on two planes passing through these start and end points, and normal to the vector formed between them. The vector used to define 1D periodicity can have any orientation, but must have a non-zero length.
SetProperties (properties table)
Modifies the state of the object using the provided table of properties. This method is used to modify multiple properties of the object in a single step.
SetTwoDimensions (startpoint Coordinate, endpointone Coordinate, endpointtwo Coordinate)
Define a 2D periodic boundary condition. The start- and end-points of a two vectors are required. These vectors form the two boundaries of the unit cell which is infinite in the direction normal to the plane on which both vectors lie. The vectors that define the unit-cell for 2D periodicity must have non-zero length, and cannot be oriented in the same direction.

## Property Details

BeamSquintAngle
The beam pointing (squint) angle used to determine the phase shift. Only applicable if PhaseShiftMethod is FromSquintAngle.
Type
PeriodicBoundaryBeamSquintAngle
Access
Dimension
The PBC dimension type defining the number of periodic boundaries. The unit cell is repeated along the defined dimension type.
Type
PeriodicBoundaryDimensionsEnum
Access
EndPointVectorOne
The end point defining the first vector. Only applicable if the Dimension is OneDimension or TwoDimensions.
Type
LocalCoordinates
Access
EndPointVectorTwo
The end point defining the second vector. Only applicable if the Dimension is TwoDimensions.
Type
LocalCoordinates
Access
LocalWorkplane
The periodic boundary conditions workplane.
Type
LocalWorkplane
Access
PhaseShift
The phase shift in each vector direction. Only applicable if PhaseShiftMethod is SpecifyManually.
Type
PeriodicBoundaryPhaseShift
Access
PhaseShiftMethod
Defines the method for determining the phase shift of the source between one unit cell and the next when doing periodic boundary condition calculations. When a plane wave is used as source the phase difference between the cells cannot be specified, but is determined by the source.
Type
PeriodicBoundaryPhaseShiftMethodEnum
Access
StartPoint
The start point used for defining the vectors that define the periodicity. Only applicable if the Dimension is OneDimension or TwoDimensions.
Type
LocalCoordinates
Access
Type
The object type string.
Type
string
Access

## Method Details

ClearDimensions ()
Clears the periodic boundary condition definition settings. This will set the Dimension to None.
GetProperties ()
Returns a table of properties representing the state of the object. The properties table can be used with the SetProperties method to change multiple properties of the object in one step.
Return
table
A properties table.
SetOneDimension (startpoint Coordinate, endpoint Coordinate)
Define a 1D periodic boundary condition. The start- and end-point of a single vector is required. Periodicity is then defined based on two planes passing through these start and end points, and normal to the vector formed between them. The vector used to define 1D periodicity can have any orientation, but must have a non-zero length.
Input Parameters
startpoint(Coordinate)
Start point of vector.
endpoint(Coordinate)
End point of vector.
SetProperties (properties table)
Modifies the state of the object using the provided table of properties. This method is used to modify multiple properties of the object in a single step.
Input Parameters
properties(table)
A table of properties defining the new state of the object.
SetTwoDimensions (startpoint Coordinate, endpointone Coordinate, endpointtwo Coordinate)
Define a 2D periodic boundary condition. The start- and end-points of a two vectors are required. These vectors form the two boundaries of the unit cell which is infinite in the direction normal to the plane on which both vectors lie. The vectors that define the unit-cell for 2D periodicity must have non-zero length, and cannot be oriented in the same direction.
Input Parameters
startpoint(Coordinate)
Start point of both vectors.
endpointone(Coordinate)
End point of first vector.
endpointtwo(Coordinate)
End point of second vector.