This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

structuralIC

Set initial conditions for a transient structural model

Syntax

structuralIC(structuralmodel,'Displacement',u0,'Velocity',v0)
structuralIC(___RegionType,RegionID)
structuralIC(structuralmodel,Sresults)
structuralIC(structuralmodel,Sresults,iT)
struct_ic = structuralIC(___)

Description

example

structuralIC(structuralmodel,'Displacement',u0,'Velocity',v0) sets initial displacement and velocity for the entire geometry.

example

structuralIC(___RegionType,RegionID) sets initial displacement and velocity for a particular geometry region using the arguments from the previous syntax.

example

structuralIC(structuralmodel,Sresults) sets initial displacement and velocity using the solution Sresults from a previous structural analysis on the same geometry. If Sresults is obtained by solving a transient structural problem, then structuralIC uses the solution Sresults for the last time-step.

structuralIC(structuralmodel,Sresults,iT) uses the solution Sresults for the time-step iT from a previous structural analysis on the same geometry.

struct_ic = structuralIC(___) returns a handle to the structural initial conditions object.

Examples

collapse all

Specify initial velocity values for the entire geometry and for a particular face.

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

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

Create a geometry and include it into 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 zero initial velocity on the entire geometry. When you specify only the initial velocity or initial displacement, structuralIC assumes that the omitted parameter is zero. For example, here the initial displacement is also zero.

structuralIC(structuralmodel,'Velocity',[0;0;0])
ans = 
  GeometricStructuralICs with properties:

             RegionType: 'Cell'
               RegionID: 1
    InitialDisplacement: []
        InitialVelocity: [3x1 double]

Update the initial velocity on face 2 to model impulsive excitation.

structuralIC(structuralmodel,'Face',2,'Velocity',[0;60;0])
ans = 
  GeometricStructuralICs with properties:

             RegionType: 'Face'
               RegionID: 2
    InitialDisplacement: []
        InitialVelocity: [3x1 double]

Specify initial z-displacement to be dependent on the coordinates x and y.

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

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

Create the geometry and include it into 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 zero initial displacement on the entire geometry.

structuralIC(structuralmodel,'Displacement',[0;0;0])
ans = 
  GeometricStructuralICs with properties:

             RegionType: 'Cell'
               RegionID: 1
    InitialDisplacement: [3x1 double]
        InitialVelocity: []

Now change the initial displacement in the z-direction on face 2 to a function of the coordinates x and y:

Write the following function file. Save it to a location on your MATLAB® path.

function uinit = initdisp(location)

M = length(location.x);

uinit = zeros(3,M);

uinit(3,:) = location.x.^2 + location.y.^2;

Pass the initial displacement to your structural model.

structuralIC(structuralmodel,'Face',2,'Displacement',@initdisp)
ans = 
  GeometricStructuralICs with properties:

             RegionType: 'Face'
               RegionID: 2
    InitialDisplacement: @initdisp
        InitialVelocity: []

Use a static solution as an initial condition for a dynamic structural model.

Create a static model.

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

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

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

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

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

Apply the boundary condition and static load.

structuralBC(staticmodel,'Face',5,'Constraint','fixed');
structuralBoundaryLoad(staticmodel,'Face',3,'SurfaceTraction',[0;1E6;0]);

Generate a mesh and solve the model.

generateMesh(staticmodel,'Hmax',0.02);
Rstatic = solve(staticmodel);

Create a dynamic model and assign geometry.

dynamicmodel = createpde('structural','transient-solid');
gm = multicuboid(0.06,0.005,0.01);
dynamicmodel.Geometry = gm;

Apply the boundary condition.

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

Generate a mesh.

generateMesh(dynamicmodel,'Hmax',0.02);

Specify the initial condition using the static solution.

structuralIC(dynamicmodel,Rstatic)
ans = 
  NodalStructuralICs with properties:

    InitialDisplacement: [113x3 double]
        InitialVelocity: [113x3 double]

Input Arguments

collapse all

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

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

Initial 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 elements represent the components of initial displacement.

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 corresponds to the initial displacement at the coordinates provided by the solver. The approaches for using function handles to specify initial conditions for StructuralModel and PDEModel are the same. For details about nonconstant initial conditions for a PDEModel object, see Nonconstant Initial Conditions.

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

Data Types: double | function_handle

Initial velocity, 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 elements represent the components of initial velocity.

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 corresponds to the initial velocity at the coordinates provided by the solver. The approaches for using function handles to specify initial conditions for StructuralModel and PDEModel are the same. For details about nonconstant initial conditions for a PDEModel object, see Nonconstant Initial Conditions.

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

Data Types: double | function_handle

Geometric region type, specified as 'Face', 'Edge', 'Vertex', or 'Cell'.

When you apply multiple initial condition assignments, the solver uses these precedence rules for determining the initial condition.

  • For multiple assignments to the same geometric region, the solver uses the last applied setting.

  • For separate assignments to a geometric region and the boundaries of that region, the solver uses the specified assignment on the region and chooses the assignment on the boundary as follows. The solver gives an 'Edge' assignment precedence over a 'Face' assignment, even if you specify a 'Face' assignment after an 'Edge' assignment. The precedence levels are 'Vertex (highest precedence), 'Edge', 'Face', 'Cell' (lowest precedence).

  • For an assignment made with the results object, the solver uses that assignment instead of all previous assignments.

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

Data Types: char

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: structuralIC(structuralmodel,'Face',[2,5],'Displacement',[0;0;0.01],'Velocity',[0;60;0])

Data Types: double

Structural model solution, specified as a StaticStructuralResults or TransientStructuralResults object. Create Sresults by using solve.

Time index, specified as a positive integer.

Example: structuralIC(structuralmodel,Sresults,21)

Data Types: double

Output Arguments

collapse all

Handle to initial conditions, returned as an object. structuralIC associates the structural initial condition with the geometric region in the case of a geometric assignment, or the nodes in the case of a results-based assignment.

Introduced in R2018a