Main Content

edgeBC

Boundary conditions on geometry edge

Since R2023a

Description

An edgeBC object specifies the type of boundary condition on an edge of a geometry. An femodel object contains an array of edgeBC objects in its EdgeBC property.

Creation

Description

example

model.EdgeBC(EdgeID) = edgeBC(Name=Value) creates an edgeBC object and sets properties using one or more name-value arguments. This syntax assigns the specified structural, thermal, or electromagnetic boundary condition to the specified edges of the geometry stored in the femodel object model. For example, model.EdgeBC([2 5]) = edgeBC(Constraint="fixed") specifies that edges 2 and 5 are fixed boundaries.

Input Arguments

expand all

Edge IDs, specified as a vector of positive integers. Find the edge IDs using pdegplot with the EdgeLabels value set to "on".

Data Types: double

Properties

expand all

Standard structural boundary constraints, specified as "fixed".

Data Types: char | string

x-component of enforced displacement, specified as a real number or function handle. The function must return a row vector. Each element of this vector corresponds to the x-component value of the enforced displacement at the boundary coordinates provided by the solver. For a transient or frequency response analysis, XDisplacement also can be a function of time or frequency, respectively. For details, see Nonconstant Parameters of Finite Element Model.

For axisymmetric models, this property contains the radial component of the enforced displacement.

Data Types: double | function_handle

y-component of enforced displacement, specified as a real number or function handle. The function must return a row vector. Each element of this vector corresponds to the y-component value of the enforced displacement at the boundary coordinates provided by the solver. For a transient or frequency response analysis, YDisplacement also can be a function of time or frequency, respectively. For details, see Nonconstant Parameters of Finite Element Model.

For axisymmetric models, this property contains the axial component of the enforced displacement.

Data Types: double | function_handle

z-component of enforced displacement for a 3-D model, specified as a real number or function handle. The function must return a row vector. Each element of this vector corresponds to the z-component value of the enforced displacement at the boundary coordinates provided by the solver. For a transient or frequency response analysis, ZDisplacement also can be a function of time or frequency, respectively. For details, see Nonconstant Parameters of Finite Element Model.

Data Types: double | function_handle

Temperature boundary condition, specified as a real number or function handle. Use a function handle to specify a temperature that depends on space and time. For details, see Nonconstant Parameters of Finite Element Model.

Data Types: double | function_handle

Voltage, specified as a real number or function handle. Use a function handle to specify a voltage that depends on the coordinates. For details, see Nonconstant Parameters of Finite Element Model.

The solver uses a voltage boundary condition for an electrostatic analysis.

Data Types: double | function_handle

Electric field, specified as a column vector of two elements for a 2-D model, vector of three elements for a 3-D model, or function handle. Use a function handle to specify an electric field that depends on the coordinates. For details, see Nonconstant Parameters of Finite Element Model.

The solver uses an electric field boundary condition for a harmonic analysis with an electric field type.

Data Types: double | function_handle

Magnetic field, specified as a column vector of two elements for a 2-D model, column vector of three elements for a 3-D model, or function handle. Use a function handle to specify a magnetic field that depends on the coordinates. For details, see Nonconstant Parameters of Finite Element Model.

The solver uses a magnetic field boundary condition for a harmonic analysis with a magnetic field type.

Data Types: double | function_handle

Magnetic potential, specified as a real number, column vector of three elements for a 3-D model, or function handle. Use a function handle to specify a magnetic potential that depends on the coordinates.

The solver uses a magnetic potential boundary condition for a magnetostatic analysis.

Data Types: double | function_handle

Absorbing region, specified as a farFieldBC object. Properties of this object specify the thickness of the absorbing region, exponent and scaling parameter defining the attenuation rate of the waves entering the absorbing region.

The solver uses an absorbing boundary condition for a harmonic analysis.

Examples

collapse all

Specify a temperature boundary condition for an femodel object representing a steady-state thermal problem.

Create an femodel object for solving a steady-state thermal problem, and assign the unit square geometry to the model.

model = femodel(AnalysisType="thermalSteady", ...
                Geometry=@squareg);

Plot the geometry with the edge labels.

pdegplot(model.Geometry,EdgeLabels="on");
xlim([-1.1 1.1])
ylim([-1.1 1.1])

Apply a temperature boundary condition on two edges of the square.

model.EdgeBC([1 3]) = edgeBC(Temperature=100);
model.EdgeBC
ans = 
  1x4 edgeBC array

Properties for analysis type: thermalSteady

Index    Temperature
  1          100    
  2          []     
  3          100    
  4          []     

  Show all properties

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

Version History

Introduced in R2023a