Main Content

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

This property is read-only.

Electric potential values at nodes, returned as a vector.

Data Types: double

This property is read-only.

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

This property is read-only.

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.

This property is read-only.

Finite element mesh, returned as an FEMesh object.

Object Functions

interpolateElectricPotentialInterpolate electric potential in electrostatic or DC conduction result at arbitrary spatial locations
interpolateElectricFieldInterpolate electric field in electrostatic or DC conduction result at arbitrary spatial locations
interpolateCurrentDensityInterpolate 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)

Figure contains an axes object. The axes object contains 6 objects of type quiver, text, patch, line.

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)

Figure contains an axes object. The hidden axes object contains 5 objects of type patch, quiver, text.

Plot the x-component of the current density.

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

Figure contains an axes object. The hidden axes object with title x-Component of Current Density contains 5 objects of type patch, quiver, text.

Plot the y-component of the current density.

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

Figure contains an axes object. The hidden axes object with title y-Component of Current Density contains 5 objects of type patch, quiver, text.

Plot the z-component of the current density.

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

Figure contains an axes object. The hidden axes object with title z-Component of Current Density contains 5 objects of type patch, quiver, text.

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)

Figure contains an axes object. The axes object contains 6 objects of type quiver, text, patch, line.

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)

Figure contains an axes object. The hidden axes object contains 5 objects of type patch, quiver, text.

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

Figure contains an axes object. The hidden axes object contains 5 objects of type patch, quiver, text.

Version History

Introduced in R2022b