# reduce

## Syntax

## Description

reduces a structural analysis model to the fixed interface modes in the frequency range
`Rcb`

= reduce(`structuralmodel`

,"FrequencyRange",`[omega1,omega2]`

)`[omega1,omega2]`

and the boundary interface degrees of
freedom.

reduces a thermal analysis model to the modes specified in
`Rtherm`

= reduce(`thermalmodel`

,"ModalResults",`thermalModalR`

)`thermalModalR`

. When reducing a thermal model, thermal properties of
materials, internal heat sources, and boundary conditions cannot depend on time or
temperature.

also truncates the number of modes to `Rtherm`

= reduce(`thermalmodel`

,"ModalResults",`thermalModalR`

,"NumModes",`N`

)`N`

. Using this syntax, you can
compute a larger number of modes and then use a subset of these modes to construct a
reduced-order model.

## Examples

### Reduce `femodel`

for Structural Analysis

*Since R2024a*

Reduce a model for transient structural analysis of a beam to the fixed interface modes in a specified frequency range and the boundary interface degrees of freedom.

Create an `femodel`

object for transient structural analysis of a 3-D problem, and assign the beam geometry to the model.

structuralmodel = femodel(AnalysisType="structuralTransient", ... Geometry=multicuboid(0.1,0.01,0.01));

Plot the geometry with edge labels.

```
pdegplot(structuralmodel,EdgeLabels="on",FaceAlpha=0.5)
view([50 25])
```

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

structuralmodel.MaterialProperties = ... materialProperties(YoungsModulus=200e9, ... PoissonsRatio=0.3,MassDensity=7800);

Generate a mesh.

structuralmodel=generateMesh(structuralmodel);

Specify the ends of the beam as structural superelement interfaces by creating a `romInterface`

object for each superelement interface. The reduced-order model technique retains the degrees of freedom on the superelement interfaces while condensing all other degrees of freedom to a set of modal degrees of freedom. For better performance, use the set of edges that bound each side of the beam instead of using the entire face.

romObj1 = romInterface(Edge=[4,6,9,10]); romObj2 = romInterface(Edge=[2,8,11,12]);

Assign a vector of interface objects to the `ROMInterfaces`

property of the model.

structuralmodel.ROMInterfaces = [romObj1,romObj2];

Reduce the model to the fixed interface modes in the frequency range `[-Inf,500000]`

and the boundary interface degrees of freedom.

R = reduce(structuralmodel,FrequencyRange=[-Inf,500000])

R = ReducedStructuralModel with properties: K: [166x166 double] M: [166x166 double] NumModes: 22 RetainedDoF: [144x1 double] ReferenceLocations: [] Mesh: [1x1 FEMesh]

### Reduce `femodel`

for Thermal Analysis

*Since R2024a*

Reduce a model for thermal analysis of a square using all modes or the specified number of modes from the modal solution.

Create an `femodel`

object for transient thermal analysis, and assign the unit square geometry to the model.

`model = femodel(AnalysisType="thermalTransient",Geometry=@squareg);`

Plot the geometry with the edge labels.

```
pdegplot(model,EdgeLabels="on")
xlim([-1.1 1.1])
ylim([-1.1 1.1])
```

Specify the thermal conductivity, mass density, and specific heat of the material.

model.MaterialProperties = ... materialProperties(ThermalConductivity=400, ... MassDensity=1300, ... SpecificHeat=600);

Set the temperature on the right edge to `100`

.

model.EdgeBC(2) = edgeBC(Temperature=100);

Set an initial value of `0`

for the temperature.

model.FaceIC = faceIC(Temperature=0);

Generate a mesh.

model = generateMesh(model);

Solve the model for three different values of heat source and collect snapshots.

tlist = 0:10:600; snapShotIDs = [1:10 59 60 61]; Tmatrix = []; heatVariation = [10000 15000 20000 -1000]; for q = heatVariation model.FaceLoad = faceLoad(Heat=q); results = solve(model,tlist); Tmatrix = [Tmatrix,results.Temperature(:,snapShotIDs)]; end

Switch the thermal model analysis type to modal.

`model.AnalysisType="thermalModal";`

Compute the POD modes.

RModal = solve(model,Snapshots=Tmatrix)

RModal = ModalThermalResults with properties: DecayRates: [6x1 double] ModeShapes: [1529x6 double] SnapshotsAverage: [1529x1 double] ModeType: "PODModes" Mesh: [1x1 FEMesh]

Reduce the thermal model using all modes in `RModal`

.

Rtherm = reduce(model,ModalResults=RModal)

Rtherm = ReducedThermalModel with properties: K: [7x7 double] M: [7x7 double] F: [7x1 double] InitialConditions: [7x1 double] Mesh: [1x1 FEMesh] ModeShapes: [1529x6 double] SnapshotsAverage: [1529x1 double]

Reduce the thermal model using only three modes.

Rtherm3 = reduce(model,ModalResults=RModal,NumModes=3)

Rtherm3 = ReducedThermalModel with properties: K: [4x4 double] M: [4x4 double] F: [4x1 double] InitialConditions: [4x1 double] Mesh: [1x1 FEMesh] ModeShapes: [1529x3 double] SnapshotsAverage: [1529x1 double]

### Reduce Transient Structural Model

Reduce a transient structural model to the fixed interface modes in a specified frequency range and the boundary interface degrees of freedom.

Create a transient structural 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.1,0.01,0.01); structuralmodel.Geometry = gm; pdegplot(structuralmodel,"FaceLabels","on","FaceAlpha",0.5)

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

structuralProperties(structuralmodel,"YoungsModulus",70E9, ... "PoissonsRatio",0.3, ... "MassDensity",2700);

Generate a mesh.

generateMesh(structuralmodel);

Specify the ends of the beam as structural superelement interfaces. The reduced-order model technique retains the degrees of freedom on the superelement interfaces while condensing the degrees of freedom on all other boundaries. For better performance, use the set of edges that bound each side of the beam instead of using the entire face.

structuralSEInterface(structuralmodel,"Edge",[4,6,9,10]); structuralSEInterface(structuralmodel,"Edge",[2,8,11,12]);

Reduce the model to the fixed interface modes in the frequency range `[-Inf,500000]`

and the boundary interface degrees of freedom.

`R = reduce(structuralmodel,"FrequencyRange",[-Inf,500000])`

R = ReducedStructuralModel with properties: K: [166x166 double] M: [166x166 double] NumModes: 22 RetainedDoF: [144x1 double] ReferenceLocations: [] Mesh: [1x1 FEMesh]

### Reduce Thermal Model

*Since R2022a*

Reduce a thermal model using all modes or the specified number of modes from the modal solution.

Create a transient thermal model.

thermalmodel = createpde("thermal","transient");

Create a unit square geometry and include it in the model.

geometryFromEdges(thermalmodel,@squareg);

Plot the geometry, displaying edge labels.

pdegplot(thermalmodel,"EdgeLabels","on") xlim([-1.1 1.1]) ylim([-1.1 1.1])

Specify the thermal conductivity, mass density, and specific heat of the material.

thermalProperties(thermalmodel,"ThermalConductivity",400, ... "MassDensity",1300, ... "SpecificHeat",600);

Set the temperature on the right edge to `100`

.

thermalBC(thermalmodel,"Edge",2,"Temperature",100);

Set an initial value of `0`

for the temperature.

thermalIC(thermalmodel,0);

Generate a mesh.

generateMesh(thermalmodel);

Solve the model for three different values of heat source and collect snapshots.

tlist = 0:10:600; snapShotIDs = [1:10 59 60 61]; Tmatrix = []; heatVariation = [10000 15000 20000]; for q = heatVariation internalHeatSource(thermalmodel,q); results = solve(thermalmodel,tlist); Tmatrix = [Tmatrix,results.Temperature(:,snapShotIDs)]; end

Switch the thermal model analysis type to modal.

`thermalmodel.AnalysisType = "modal";`

Compute the POD modes.

`RModal = solve(thermalmodel,"Snapshots",Tmatrix)`

RModal = ModalThermalResults with properties: DecayRates: [6x1 double] ModeShapes: [1529x6 double] SnapshotsAverage: [1529x1 double] ModeType: "PODModes" Mesh: [1x1 FEMesh]

Reduce the thermal model using all modes in `RModal`

.

`Rtherm = reduce(thermalmodel,"ModalResults",RModal) `

Rtherm = ReducedThermalModel with properties: K: [7x7 double] M: [7x7 double] F: [7x1 double] InitialConditions: [7x1 double] Mesh: [1x1 FEMesh] ModeShapes: [1529x6 double] SnapshotsAverage: [1529x1 double]

Reduce the thermal model using only three modes.

Rtherm3 = reduce(thermalmodel,"ModalResults",RModal, ... "NumModes",3)

Rtherm3 = ReducedThermalModel with properties: K: [4x4 double] M: [4x4 double] F: [4x1 double] InitialConditions: [4x1 double] Mesh: [1x1 FEMesh] ModeShapes: [1529x3 double] SnapshotsAverage: [1529x1 double]

## Input Arguments

`structuralmodel`

— Structural model

`femodel`

object for transient or modal structural
analysis | `StructuralModel`

object

Structural model, specified as an `femodel`

object for transient of
modal structural analysis or a `StructuralModel`

object.

**Example: **```
structuralmodel =
femodel(AnalysisType="structuralTransient")
```

`[omega1,omega2]`

— Frequency range

vector of two elements

Frequency range, specified as a vector of two elements. Define
`omega1`

as slightly lower than the lowest mode's frequency and
`omega2`

as slightly higher than the highest mode's frequency. For
example, if the lowest expected frequency is zero, then use a small negative value for
`omega1`

.

You can find natural frequencies and mode shapes for the specified frequency range by solving a modal analysis problem first. Then you can use a more precise frequency range to reduce the model. Note that a modal analysis problem still requires you to specify a frequency range. For example, see Modal Superposition Method for Structural Dynamics Problem.

**Example: **`[-0.1,1000]`

**Data Types: **`double`

`thermalmodel`

— Modal thermal analysis model

`femodel`

object for transient or modal thermal analysis | `ThermalModel`

object

Modal thermal analysis model, specified as an `femodel`

object for
transient or modal thermal analysis or a `ThermalModel`

object.

**Example: **```
thermalmodel =
femodel(AnalysisType="thermalTransient")
```

`thermalModalR`

— Modal analysis results for thermal model

`ModalThermalResults`

object

Modal analysis results for a thermal model, specified as a
`ModalThermalResults`

object.

**Example: **```
thermalModalR =
solve(thermalmodel,"DecayRange",[0,1000])
```

`N`

— Number of modes

positive integer

Number of modes, specified as a positive integer.

## Output Arguments

`Rcb`

— Reduced-order structural model obtained using the Craig-Bampton order reduction method

`ReducedStructuralModel`

object

Reduced-order structural model obtained using the Craig-Bampton order reduction
method, returned as a `ReducedStructuralModel`

object.

`Rtherm`

— Reduced-order thermal model

`ReducedThermalModel`

object

Reduced-order thermal model, returned as a `ReducedThermalModel`

object.

## Version History

**Introduced in R2019b**

### R2024a: ROM support for `femodel`

objects

The `reduce`

function now also reduces structural and thermal analysis
models specified as `femodel`

objects. If
the `AnalysisType`

property of an `femodel`

object is
`structuralTransient`

or `structuralModal`

, then
`reduce`

returns a `ReducedStructuralModel`

object. If
the `AnalysisType`

property is `thermalTransient`

or
`thermalModal`

, then `reduce`

returns a
`ReducedThermalModel`

object.

### R2022a: ROM support for thermal analysis

`reduce`

now also reduces thermal models.

## See Also

### Functions

### Objects

## 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)