edgeBC
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
model.EdgeBC(
creates an EdgeID
) = edgeBC(Name=Value)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
EdgeID
— Edge IDs
vector of positive integers
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
Constraint
— Standard structural boundary constraints
"fixed"
Standard structural boundary constraints, specified as
"fixed"
.
Data Types: char
| string
XDisplacement
— x-component of enforced displacement
real number | function handle
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
YDisplacement
— y-component of enforced displacement
real number | 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
ZDisplacement
— z-component of enforced displacement for 3-D model
real number | 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
— Temperature boundary condition
real number | 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
— Voltage
real number | 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
ElectricField
— Electric field
column vector | 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
MagneticField
— Magnetic field
column vector | 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
MagneticPotential
— Magnetic potential
real number | column vector | 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
FarField
— Absorbing region
farFieldBC
object
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
Temperature on Boundary
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
Boundary Conditions for 2-D Harmonic Electromagnetic Analysis
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
See Also
Objects
femodel
|fegeometry
|farFieldBC
|faceBC
|vertexBC
|cellLoad
|faceLoad
|edgeLoad
|vertexLoad
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)