# ConductionResults

DC conduction solution

Since R2022b

## Description

A `ConductionResults` object contains the electric potential, electric field, current density, and mesh values in a form convenient for plotting and postprocessing.

The electric potential, electric field, and current density values are calculated at the nodes of the triangular or tetrahedral mesh generated by `generateMesh`. Electric potential values at the nodes appear in the `ElectricPotential` property. Electric field values at the nodes appear in the `ElectricField` property. Current density values at the nodes appear in the `CurrentDensity` property.

To interpolate the electric potential, electric field, and current density to a custom grid, such as the one specified by `meshgrid`, use the `interpolateElectricPotential`, `interpolateElectricField`, and `interpolateCurrentDensity` functions.

## Creation

Solve a DC conduction problem using the `solve` function. This function returns a solution as a `ConductionResults` object.

## Properties

expand all

Electric potential values at nodes, returned as a vector.

Data Types: `double`

Electric field values at nodes, returned as an `FEStruct` object. The properties of this object contain the components of the electric field at nodes.

Electric flux density values at nodes, returned as an `FEStruct` object. The properties of this object contain the components of the electric flux density at nodes.

Finite element mesh, returned as an `FEMesh` object.

## Object Functions

 `interpolateElectricPotential` Interpolate electric potential in electrostatic or DC conduction result at arbitrary spatial locations `interpolateElectricField` Interpolate electric field in electrostatic or DC conduction result at arbitrary spatial locations `interpolateCurrentDensity` Interpolate current density in DC conduction result at arbitrary spatial locations

## Examples

collapse all

Solve a DC conduction problem on a geometry representing a 3-D plate with a hole in its center. Plot the electric potential and the components of the current density.

Create an `femodel` object for DC conduction analysis and include a geometry representing a plate with a hole.

```model = femodel(AnalysisType="dcConduction", ... Geometry="PlateHoleSolid.stl");```

Plot the geometry.

`pdegplot(model.Geometry,FaceLabels="on",FaceAlpha=0.3)`

Specify the conductivity of the material.

```model.MaterialProperties = ... materialProperties(ElectricalConductivity=6e4);```

Apply the voltage boundary conditions on the left, right, top, and bottom faces of the plate.

`model.FaceBC(3:6) = faceBC(Voltage=0);`

Specify the surface current density on the face bordering the hole.

`model.FaceLoad(7) = faceLoad(SurfaceCurrentDensity=100);`

Generate the mesh.

`model = generateMesh(model);`

Solve the model.

`R = solve(model)`
```R = ConductionResults with properties: ElectricPotential: [4747x1 double] ElectricField: [1x1 FEStruct] CurrentDensity: [1x1 FEStruct] Mesh: [1x1 FEMesh] ```

Plot the electric potential.

```figure pdeplot3D(R.Mesh,ColorMapData=R.ElectricPotential)```

Plot the x-component of the current density.

```figure pdeplot3D(R.Mesh,ColorMapData=R.CurrentDensity.Jx) title("x-Component of Current Density")```

Plot the y-component of the current density.

```figure pdeplot3D(R.Mesh,ColorMapData=R.CurrentDensity.Jy) title("y-Component of Current Density")```

Plot the z-component of the current density.

```figure pdeplot3D(R.Mesh,ColorMapData=R.CurrentDensity.Jz) title("z-Component of Current Density")```

Use a solution obtained by performing a DC conduction analysis to specify current density for a magnetostatic problem.

Create an `femodel` object for DC conduction analysis and include a geometry representing a plate with a hole.

```model = femodel(AnalysisType="dcConduction", ... Geometry="PlateHoleSolid.stl");```

Plot the geometry.

`pdegplot(model.Geometry,FaceLabels="on",FaceAlpha=0.3)`

Specify the conductivity of the material.

```model.MaterialProperties = ... materialProperties(ElectricalConductivity=6e4);```

Apply the voltage boundary conditions on the left, right, top, and bottom faces of the plate.

`model.FaceBC(3:6) = faceBC(Voltage=0);`

Specify the surface current density on the face bordering the hole.

`model.FaceLoad(7) = faceLoad(SurfaceCurrentDensity=100);`

Generate the mesh.

`model = generateMesh(model);`

Solve the model.

`R = solve(model);`

Change the analysis type of the model to magnetostatic.

`model.AnalysisType = "magnetostatic";`

This model already has a quadratic mesh that you generated for the DC conduction analysis. For a 3-D magnetostatic model, the mesh must be linear. Generate a new linear mesh. The `generateMesh` function creates a linear mesh by default if the model is 3-D and magnetostatic.

`model = generateMesh(model);`

Specify the vacuum permeability value in the SI system of units.

`model.VacuumPermeability = 1.2566370614e-6;`

Specify the relative permeability of the material.

```model.MaterialProperties = ... materialProperties(RelativePermeability=5000);```

Apply the magnetic potential boundary conditions on the side faces and the face bordering the hole.

```model.FaceBC(3:6) = faceBC(MagneticPotential=[0;0;0]); model.FaceBC(7) = faceBC(MagneticPotential=[0;0;0.01]);```

Specify the current density for the entire geometry using the DC conduction solution.

`model.CellLoad = cellLoad(CurrentDensity=R);`

Solve the problem.

`Rmagnetostatic = solve(model);`

Plot the x- and z-components of the magnetic potential.

```pdeplot3D(Rmagnetostatic.Mesh, ... ColormapData=Rmagnetostatic.MagneticPotential.Ax)```

```pdeplot3D(Rmagnetostatic.Mesh, ... ColormapData=Rmagnetostatic.MagneticPotential.Az)```

## Version History

Introduced in R2022b