structuralIC
(To be removed) Set initial conditions for a transient structural model
structuralIC will be removed. Use
cellIC,
faceIC,
edgeIC, and
vertexIC
instead. (since R2023a) For more information on updating your code, see Version History.
Syntax
Description
structuralIC(
sets initial displacement and velocity for the entire geometry.structuralmodel,"Displacement",u0,"Velocity",v0)
structuralIC(___
sets initial displacement and velocity for a particular geometry region using the
arguments from the previous syntax.RegionType,RegionID)
structuralIC(
sets initial displacement and velocity using the solution
structuralmodel,Sresults)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(
uses the solution structuralmodel,Sresults,iT)Sresults for the time-step
iT from a previous structural analysis on the same
geometry.
returns a handle to the structural initial conditions object.struct_ic = structuralIC(___)
Examples
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: [3×1 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: [3×1 double]
Input Arguments
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.
Use a function handle to specify spatially varying 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. For details, see More About.
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.
Use a function handle to specify spatially varying 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. For details, see More About.
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
resultsobject, 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 by using pdegplot.
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
Handle to initial conditions, returned as a
GeometricStructuralICs or
NodalStructuralICs object. See GeometricStructuralICs Properties and NodalStructuralICs Properties.
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.
More About
Use a function handle to specify the following structural parameters when they depend on space and, depending of the type of structural analysis, either time or frequency:
Surface traction on the boundary
Pressure normal to the boundary
Concentrated force at a vertex
Distributed spring stiffness for each translational direction used to model elastic foundation
Enforced displacement and its components
Initial displacement and velocity (can depend on space only)
For example, use function handles to specify the pressure load, x-component of the enforced displacement, and the initial displacement for this model.
structuralBoundaryLoad(model,"Face",12, ... "Pressure",@myfunPressure) structuralBC(model,"Face",2, ... "XDisplacement",@myfunBC) structuralIC(model,"Face",12, ... "Displacement",@myfunIC)
For all parameters, except the initial displacement and velocity, the function must be of the form:
function structuralVal = myfun(location,state)For the initial displacement and velocity the function must be of the form:
function structuralVal = myfun(location)The solver computes and populates the data in the location and
state structure arrays and passes this data to your function. You can
define your function so that its output depends on this data. You can use any names instead
of location and state, but the function must have
exactly two arguments (or one argument if the function specifies the initial displacement or
initial velocity).
location— A structure containing these fields:location.x— The x-coordinate of the point or pointslocation.y— The y-coordinate of the point or pointslocation.z— For a 3-D or an axisymmetric geometry, the z-coordinate of the point or pointslocation.r— For an axisymmetric geometry, the r-coordinate of the point or points
Furthermore, for boundary conditions, the solver passes these data in the
locationstructure:location.nx— x-component of the normal vector at the evaluation point or pointslocation.ny— y-component of the normal vector at the evaluation point or pointslocation.nz— For a 3-D or an axisymmetric geometry, z-component of the normal vector at the evaluation point or pointslocation.nr— For an axisymmetric geometry, r-component of the normal vector at the evaluation point or points
state— A structure containing these fields for dynamic structural problems:state.timecontains the time at evaluation points.state.frequencycontains the frequency at evaluation points.
state.timeandstate.frequencyare scalars.
Boundary constraints and loads get these data from the solver:
location.x,location.y,location.z,location.rlocation.nx,location.ny,location.nz,location.nrstate.timeorstate.frequency(depending of the type of structural analysis)
Initial conditions get these data from the solver:
location.x,location.y,location.z,location.rSubdomain ID
If a parameter represents a vector value, such as surface traction, spring stiffness, force, or displacement, your 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 parameter value (a vector) at the boundary coordinates provided by the solver.
If a parameter represents a scalar value, such as pressure or a displacement component, your function must return a row vector where each element corresponds to the parameter value (a scalar) at the boundary coordinates provided by the solver.
If boundary conditions depend on state.time or
state.frequency, ensure that your function returns a matrix of
NaN of the correct size when state.frequency or
state.time are NaN. Solvers check whether a
problem is nonlinear or time dependent by passing NaN state values and
looking for returned NaN values.
To use additional arguments in your function, wrap your function (that takes additional arguments) with an anonymous function that takes only the location and state arguments. For example:
structuralVal = ... @(location,state) myfunWithAdditionalArgs(location,state,arg1,arg2...) structuralBC(model,"Face",2,"XDisplacement",structuralVal) structuralVal = ... @(location) myfunWithAdditionalArgs(location,arg1,arg2...) structuralIC(model,"Face",2,"Displacement",structuralVal)
Version History
Introduced in R2018astructuralIC will be removed. Use cellIC,
faceIC,
edgeIC, and
vertexIC
instead.
For example, you can specify zero velocity for the entire geometry as an initial condition.
gm = multicuboid(0.06,0.005,0.01); model = femodel(AnalysisType="structuralTransient", ... Geometry=gm); model.CellIC = cellIC(Velocity=[0;0;0]);
The unified finite element model workflow defines the type of a problem and all of
its parameters as the properties of an femodel object. This
object enables you to specify physical parameters for structural, thermal, and
electromagnetic types of analyses. The solver in the unified workflow uses only the
parameters (properties) appropriate for the current analysis type while ignoring all
other properties. If you switch the analysis type by setting the
AnalysisType property of the model, the solver uses the
appropriate set of properties corresponding to the new analysis type.
For more help migrating your existing code that uses
StructuralModel to the unified finite element workflow, see
Migration from Domain-Specific to Unified Workflow.
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)