faceBC
Description
A faceBC
object specifies the type of boundary
condition on a face of a geometry. An femodel
object contains
an array of faceBC
objects in its FaceBC
property.
Creation
Description
model.FaceBC(
creates a FaceID
) = faceBC(Name=Value)faceBC
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 faces of the geometry stored in the
femodel
object model
. For example,
model.FaceBC([2 5]) = faceBC(Constraint="fixed")
specifies that faces
2 and 5 are fixed boundaries.
Input Arguments
FaceID
— Face IDs
vector of positive integers
Face IDs, specified as a vector of positive integers. Find the face IDs using
pdegplot
with the
FaceLabels
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.
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.
Data Types: double
| function_handle
ZDisplacement
— z-component of enforced displacement
real number | function handle
z-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 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. For details, see Nonconstant Parameters of Finite Element Model.
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
Fixed Boundaries
Specify fixed boundary conditions for an femodel
object representing a static structural problem.
Create and plot a geometry that consists of two nested cylinders.
gm = multicylinder([0.01,0.015],0.05);
pdegplot(gm,FaceLabels="on",FaceAlpha=0.4);
Create an femodel
object for solving a static structural problem, and assign the geometry to the model.
model = femodel(AnalysisType="structuralStatic", ... Geometry=gm);
Specify that faces 1 and 4 are fixed boundaries.
model.FaceBC([1 4]) = faceBC(Constraint="fixed");
model.FaceBC
ans = 1x6 faceBC array Properties for analysis type: structuralStatic Index Constraint XDisplacement YDisplacement ZDisplacement 1 fixed [] [] [] 2 [] [] [] [] 3 [] [] [] [] 4 fixed [] [] [] 5 [] [] [] [] 6 [] [] [] [] Show all properties
Boundary Conditions for 3-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 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
See Also
Objects
femodel
|fegeometry
|farFieldBC
|edgeBC
|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)