structuralBC

Specify boundary conditions for structural model

Syntax

structuralBC(structuralmodel,RegionType,RegionID,'Constraint',Cval)
structuralBC(structuralmodel,RegionType,RegionID,'Displacement',Dval)
structuralBC(structuralmodel,RegionType,RegionID,'XDisplacement',XDval,'YDisplacement',YDval,'ZDisplacement',ZDval)
structuralBC(structuralmodel,RegionType,RegionID,'XDisplacement',XDval,Name,Value)
structuralBC(structuralmodel,RegionType,RegionID,'YDisplacement',YDval,Name,Value)
structuralBC(structuralmodel,RegionType,RegionID,'ZDisplacement',ZDval,Name,Value)
structuralBC(___,'Vectorized','on')
bc = structuralBC(___)

Description

example

structuralBC(structuralmodel,RegionType,RegionID,'Constraint',Cval) specifies one of the standard structural boundary constraints. Here, Cval can be 'fixed', 'free', 'roller', or 'symmetric'. The default value is 'free'.

Avoid using 'symmetric' for transient and modal analysis, since symmetric constraint can prevent participation of some structural modes.

example

structuralBC(structuralmodel,RegionType,RegionID,'Displacement',Dval) enforces displacement on the boundary of type RegionType with RegionID ID numbers.

example

structuralBC(structuralmodel,RegionType,RegionID,'XDisplacement',XDval,'YDisplacement',YDval,'ZDisplacement',ZDval) specifies the x-, y-, and z-components of the enforced displacement.

structuralBC does not require you to specify all three components. Depending on your structural analysis problem, you can specify one or more components by picking the corresponding arguments and omitting others.

structuralBC(structuralmodel,RegionType,RegionID,'XDisplacement',XDval,Name,Value)specifies the form and duration of the time-varying value of the x-component of the enforced displacement.

example

structuralBC(structuralmodel,RegionType,RegionID,'YDisplacement',YDval,Name,Value) specifies the form and duration of the time-varying value of the y-component of the enforced displacement.

structuralBC(structuralmodel,RegionType,RegionID,'ZDisplacement',ZDval,Name,Value) specifies the form and duration of the time-varying value of the z-component of the enforced displacement.

structuralBC(___,'Vectorized','on') uses vectorized function evaluation when you pass a function handle as an argument. If your function handle computes in a vectorized fashion, then using this argument saves time. See Vectorization (MATLAB). For details of this evaluation, see Nonconstant Boundary Conditions.

Use this syntax with any of the input arguments from previous syntaxes.

bc = structuralBC(___) returns the structural boundary condition object using any of the input arguments from previous syntaxes.

Examples

collapse all

Apply fixed boundaries and traction on two ends of a bimetallic cable.

Create a structural model.

structuralModel = createpde('structural','static-solid');

Create nested cylinders to model a bimetallic cable.

gm = multicylinder([0.01,0.015],0.05);

Assign the geometry to the structural model and plot the geometry.

structuralModel.Geometry = gm;
pdegplot(structuralModel,'CellLabels','on','FaceLabels','on','FaceAlpha',0.4)

For each metal, specify the Young's modulus and Poisson's ratio.

structuralProperties(structuralModel,'Cell',1,'YoungsModulus',110E9, ...
                                              'PoissonsRatio',0.28);
structuralProperties(structuralModel,'Cell',2,'YoungsModulus',210E9, ...
                                              'PoissonsRatio',0.3);

Specify that faces 1 and 4 are fixed boundaries.

structuralBC(structuralModel,'Face',[1,4],'Constraint','fixed')
ans = 
  StructuralBC with properties:

                RegionType: 'Face'
                  RegionID: [1 4]
                Vectorized: 'off'

   Boundary Constraints and Enforced Displacements
              Displacement: []
             XDisplacement: []
             YDisplacement: []
             ZDisplacement: []
                Constraint: "fixed"

   Boundary Loads
                     Force: []
           SurfaceTraction: []
                  Pressure: []
    TranslationalStiffness: []

Specify the surface traction for faces 2 and 5.

structuralBoundaryLoad(structuralModel,'Face',[2,5],'SurfaceTraction',[0;0;100])
ans = 
  StructuralBC with properties:

                RegionType: 'Face'
                  RegionID: [2 5]
                Vectorized: 'off'

   Boundary Constraints and Enforced Displacements
              Displacement: []
             XDisplacement: []
             YDisplacement: []
             ZDisplacement: []
                Constraint: []

   Boundary Loads
                     Force: []
           SurfaceTraction: [3x1 double]
                  Pressure: []
    TranslationalStiffness: []

Create a structural model.

structuralModel = createpde('structural','static-solid');

Create a block geometry.

gm = multicuboid(0.2,0.1,0.05);

Assign the geometry to the structural model and plot the geometry.

structuralModel.Geometry = gm;
pdegplot(structuralModel,'FaceLabels','on','FaceAlpha',0.5)

Specify the Young's modulus, Poisson's ratio, and mass density.

structuralProperties(structuralModel,'YoungsModulus',74e9,...
                                     'PoissonsRatio',0.42,...
                                     'MassDensity',19.29e3);

Specify the gravity load on the beam.

structuralBodyLoad(structuralModel,'GravitationalAcceleration',[0;0;-9.8]);

Specify that face 5 is a fixed boundary.

structuralBC(structuralModel,'Face',5,'Constraint','fixed');

Specify z-displacement on face 3 of the model. By leaving the x- and y-displacements unspecified, you enable face 3 to move in x- and y-direction.

structuralBC(structuralModel,'Face',3,'ZDisplacement',0.0001);

Generate a mesh and solve the model.

generateMesh(structuralModel);
R = solve(structuralModel); 

Plot the deformed shape with the x-component of normal stress.

pdeplot3D(structuralModel,'ColorMapData',R.Stress.sxx,'Deformation',R.Displacement)

Now specify all three displacements on the same face. Here, z-displacement is the same, but x- and y-displacements are both zero. Face 3 cannot move in the x- and y-directions.

structuralBC(structuralModel,'Face',3,'Displacement',[0;0;0.0001]); 
R = solve(structuralModel);
pdeplot3D(structuralModel,'ColorMapData',R.Stress.sxx,'Deformation',R.Displacement)

Thus, specifying 'Displacement',[0;0;0.0001] is equivalent to specifying 'XDisplacement',0,'YDisplacement',0,'ZDisplacement',0.0001.

structuralBC(structuralModel,'Face',3,'XDisplacement',0, ...
                                      'YDisplacement',0, ...
                                      'ZDisplacement',0.0001); 
R = solve(structuralModel);
pdeplot3D(structuralModel,'ColorMapData',R.Stress.sxx,'Deformation',R.Displacement)

Use a function handle to specify a harmonically varying excitation in a beam.

Create a transient dynamic model for a 3-D problem.

structuralmodel = createpde('structural','transient-solid');

Create a geometry and include it in the model. Plot the geometry.

gm = multicuboid(0.06,0.005,0.01);
structuralmodel.Geometry = gm;
pdegplot(structuralmodel,'FaceLabels','on','FaceAlpha',0.5)
view(50,20)

Specify Young's modulus, Poisson's ratio, and mass density of the material.

structuralProperties(structuralmodel,'YoungsModulus',210E9, ...
                                     'PoissonsRatio',0.3, ...
                                     'MassDensity',7800);

Fix one end of the beam.

structuralBC(structuralmodel,'Face',5,'Constraint','fixed');

Apply a sinusoidal displacement along y-direction on the end opposite to the fixed end of the beam.

yDisplacementFunc = @(location,state) ones(size(location.y))*1E-4*sin(50*state.time);
structuralBC(structuralmodel,'Face',3,'YDisplacement',yDisplacementFunc)
ans = 
  StructuralBC with properties:

                RegionType: 'Face'
                  RegionID: 3
                Vectorized: 'off'

   Boundary Constraints and Enforced Displacements
              Displacement: []
             XDisplacement: []
             YDisplacement: [function_handle]
             ZDisplacement: []
                Constraint: []

   Boundary Loads
                     Force: []
           SurfaceTraction: []
                  Pressure: []
    TranslationalStiffness: []

   Time Variation of Force, Pressure, or Enforced Displacement
                 StartTime: []
                   EndTime: []
                  RiseTime: []
                  FallTime: []

   Sinusoidal Variation of Force, Pressure, or Enforced Displacement
                 Frequency: []
                     Phase: []

Specify a harmonically varying excitation by specifying its frequency.

Create a transient dynamic model for a 3-D problem.

structuralmodel = createpde('structural','transient-solid');

Create a geometry and include it in the model. Plot the geometry.

gm = multicuboid(0.06,0.005,0.01);
structuralmodel.Geometry = gm;
pdegplot(structuralmodel,'FaceLabels','on','FaceAlpha',0.5)
view(50,20)

Specify the Young's modulus, Poisson's ratio, and mass density of the material.

structuralProperties(structuralmodel,'YoungsModulus',210E9, ...
                                     'PoissonsRatio',0.3, ...
                                     'MassDensity',7800);

Fix one end of the beam.

structuralBC(structuralmodel,'Face',5,'Constraint','fixed');

Apply a sinusoidal displacement along y-direction on the end opposite to the fixed end of the beam.

structuralBC(structuralmodel,'Face',3,'YDisplacement',1E-4,'Frequency',50);

Fix one corner of a rectangular plate to restrain all rigid body motions of the model.

Create a structural model for static plane-stress analysis.

model = createpde('structural','static-planestress'); 

Create the geometry and include it into the structural model.

length = 1;
width = 0.5;
radius = 0.1;
R1 = [3 4 -length length length -length ...
          -width -width  width   width]';
C1 = [1 0 0 radius 0 0 0 0 0 0]';
gdm = [R1 C1];
ns = char('R1','C1');
g = decsg(gdm,'R1- C1',ns');
geometryFromEdges(model,g);

Plot the geometry displaying edge labels.

figure
pdegplot(model,'EdgeLabels','on');
axis([-1.2*length 1.2*length ...
      -1.2*width  1.2*width])

Plot the geometry displaying vertex labels.

figure
pdegplot(model,'VertexLabels','on');
axis([-1.2*length 1.2*length ...
      -1.2*width  1.2*width])

Specify the Young's modulus and Poisson's ratio of the material.

structuralProperties(model,'YoungsModulus',210E9,'PoissonsRatio',0.3);

Set the x-component of displacement on the left edge of the plate to zero to resist the applied load..

structuralBC(model,'Edge',3,'XDisplacement',0);

Apply the surface traction with a non-zero x-component on the right edge of the plate.

structuralBoundaryLoad(model,'Edge',1,'SurfaceTraction',[100000 0]);

Set the y-component of displacement at the bottom left corner (vertex 3) to zero to restraint the rigid body motion.

structuralBC(model,'Vertex',3,'YDisplacement',0);

Generate the mesh, using Hmax to control the mesh size. A fine mesh lets you capture the gradation in solution accurately.

generateMesh(model,'Hmax',radius/6);

Solve the problem.

R = solve(model); 

Plot the x-component of the normal stress distribution.

pdeplot(model,'XYData',R.Stress.sxx);
axis equal
colormap jet
title 'Normal Stress Along x-Direction';

Input Arguments

collapse all

Structural model, specified as a StructuralModel object. The model contains the geometry, mesh, structural properties of the material, body loads, boundary loads, and boundary conditions.

Example: structuralmodel = createpde('structural','transient-solid')

Geometric region type, specified as 'Vertex', 'Edge', or, for a 3-D model, 'Face'.

You cannot use the following geometric region types if you specify the 'roller' or 'symmetric' value for the boundary constraint Cval:

  • 'Edge' for a 3-D model

  • 'Vertex' for a 2-D or 3-D model

Example: structuralBC(structuralmodel,'Face',[2,5],'XDisplacement',0.1)

Data Types: char | string

Geometric region ID, specified as a vector of positive integers. Find the region IDs using pdegplot, as shown in Create Geometry and Remove Face Boundaries or STL File Import.

Example: structuralBC(structuralmodel,'Face',[2,5],'XDisplacement',0.01)

Data Types: double

Enforced displacement, specified as a numeric vector or function handle. A numeric vector must contain two elements for a 2-D model and three elements for a 3-D model. The function must return a two-row matrix for a 2-D model and a three-row matrix for a 3-D model. Each column of the matrix must correspond to an enforced displacement vector at the boundary coordinates provided by the solver. In case of a transient structural model, Dval also can be a function of time.

Example: structuralBC(structuralmodel,'Face',[2,5],'Displacement',[0;0;0.01])

Data Types: double | function_handle

x-component of enforced displacement, specified as a 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. In case of a transient structural model, XDval also can be a function of time.

Example: structuralBC(structuralmodel,'Face',[2,5],'XDisplacement',0.01)

Data Types: double | function_handle

y-component of enforced displacement, specified as a 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. In case of a transient structural model, YDval also can be a function of time.

Example: structuralBC(structuralmodel,'Face',[2,5],'YDisplacement',0.01)

Data Types: double | function_handle

z-component of enforced displacement, specified as a 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. In case of a transient structural model, ZDval also can be a function of time.

Example: structuralBC(structuralmodel,'Face',[2,5],'ZDisplacement',0.01)

Data Types: double | function_handle

Standard structural boundary constraints, specified as 'free','fixed','roller', or 'symmetric'.

You cannot use the 'roller' and 'symmetric' values with the following geometric region types:

  • 'Edge' for a 3-D model

  • 'Vertex' for a 2-D or 3-D model

Example: structuralBC(structuralmodel,'Face',[2,5],'Constraint','fixed')

Data Types: char | string

Name-Value Pair Arguments

Example: structuralBC(structuralmodel,'Face',[2,5],'XDisplacement',0.01,'RiseTime',0.5,'FallTime',0.5,'EndTime',3)

Use one or more of the name-value pair arguments to specify the form and duration of the time-varying value of a component of displacement. Specify the displacement value using one of the following arguments: XDval, YDval, or ZDval. You cannot specify more than one time-varying component or specify the Dval value with these name-value pair arguments.

You can model a rectangular, triangular, and trapezoidal displacement pulses. If the start time is 0, you can omit specifying it.

  • For a rectangular pulse, specify the start and end times.

  • For a triangular pulse, specify the start time and any two of the following times: rise time, fall time, and end time. You also can specify all three times, ensuring that they are consistent.

  • For a trapezoid pulse, specify all four times.

You can model a harmonic displacement by specifying its frequency and initial phase. If the initial phase is 0, you can omit specifying it.

Rectangular, Triangular, or Trapezoidal Pulse

collapse all

Start time for the displacement component, specified as a positive number. Specify this argument only for transient structural models.

Example: structuralBC(structuralmodel,'Face',[2,5],'XDisplacement',0.01,'StartTime',1,'EndTime',3)

Data Types: double

End time for the displacement component, specified as a positive number equal or greater than the start time value. Specify this argument only for transient structural models.

Example: structuralBC(structuralmodel,'Face',[2,5],'XDisplacement',0.01,'StartTime',1,'EndTime',3)

Data Types: double

Rise time for the displacement component, specified as a positive number. Specify this argument only for transient structural models.

Example: structuralBC(structuralmodel,'Face',[2,5],'XDisplacement',0.01,'RiseTime',0.5,'FallTime',0.5,'EndTime',3)

Data Types: double

Fall time for the displacement component, specified as a positive number. Specify this argument only for transient structural models.

Example: structuralBC(structuralmodel,'Face',[2,5],'XDisplacement',0.01,'RiseTime',0.5,'FallTime',0.5,'EndTime',3)

Data Types: double

Harmonic Displacement

collapse all

Frequency of a sinusoidal displacement component value, specified as a positive number in radians per unit of time. Specify this argument only for transient structural models.

Example: structuralBC(structuralmodel,'Face','XDisplacement',0.01,'Frequency',25)

Data Types: double

Phase of a sinusoidal displacement component value, specified as a positive number in radians. Specify this argument only for transient structural models.

Example: structuralBC(structuralmodel,'Face',[2,5],'XDisplacement',0.01,'Frequency',25,'Phase',pi/6)

Data Types: double

Output Arguments

collapse all

Handle to boundary condition, returned as a StructuralBC object.

Tips

  • Specify as many boundary conditions as needed to restrain all rigid body motions. Not restraining all rigid body motions means that the entire geometry can freely rotate or move. The resulting linear system of equations is singular. The system can take a long time to converge, or it might not converge at all. If the system converges, the solution includes a large rigid body motion in addition to deformation.

Introduced in R2017b