generateMaxwellStressTensor
Description
results = generateMaxwellStressTensor(
generates the Maxwell stress tensor values at the mesh nodes and stores it in the
R
)MaxwellStressTensor
property of the results
object.
Here, results
is an ElectrostaticResults
or MagnetostaticResults
object.
Examples
Maxwell Stress Tensor for 2-D Electrostatic Analysis
Add the Maxwell stress tensor to the electrostatic solution stored in an ElectrostaticResults
object.
Create an femodel
object for electrostatic analysis. Include a geometry of a frame.
model = femodel(AnalysisType="electrostatic", ... Geometry="Frame.stl");
Plot the geometry of the frame with edge labels.
pdegplot(model,EdgeLabels="on");
Specify the vacuum permittivity in the SI system of units.
model.VacuumPermittivity = 8.8541878128e-12;
Specify the relative permittivity of the material.
model.MaterialProperties = ...
materialProperties(RelativePermittivity=1.00059);
Specify the electrostatic potential at the inner boundary.
model.EdgeBC([1 2 4 6]) = edgeBC(Voltage=1000);
Specify the electrostatic potential at the outer boundary.
model.EdgeBC([3 5 7 8]) = edgeBC(Voltage=0);
Generate the mesh. This assignment updates the mesh stored in the Geometry
property of the model.
model = generateMesh(model);
Solve the model.
R = solve(model)
R = ElectrostaticResults with properties: ElectricPotential: [1276x1 double] ElectricField: [1x1 FEStruct] ElectricFluxDensity: [1x1 FEStruct] Mesh: [1x1 FEMesh]
Generate the Maxwell stress tensor.
R = generateMaxwellStressTensor(R)
R = ElectrostaticResults with properties: ElectricPotential: [1276x1 double] ElectricField: [1x1 FEStruct] ElectricFluxDensity: [1x1 FEStruct] Mesh: [1x1 FEMesh] MaxwellStressTensor: [2x2x1276 double]
Maxwell Stress Tensor for 3-D Magnetostatic Analysis
Add the Maxwell stress tensor to the magnetostatic solution stored in a MagnetostaticResults
object.
Create an femodel
object for magnetostatic analysis. Include a geometry representing a plate with a hole.
model = femodel(AnalysisType="magnetostatic", ... Geometry="PlateHoleSolid.stl");
Plot the geometry of the plate with face labels.
pdegplot(model,FaceLabels="on",FaceAlpha=0.3);
Specify the vacuum permeability 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.
model.CellLoad = cellLoad(CurrentDensity=[0;0;0.5]);
Generate the mesh. This assignment updates the mesh stored in the Geometry
property of the model.
model = generateMesh(model);
Solve the model.
R = solve(model)
R = MagnetostaticResults with properties: MagneticPotential: [1x1 FEStruct] MagneticField: [1x1 FEStruct] MagneticFluxDensity: [1x1 FEStruct] Mesh: [1x1 FEMesh]
Generate the Maxwell stress tensor.
R = generateMaxwellStressTensor(R)
R = MagnetostaticResults with properties: MagneticPotential: [1x1 FEStruct] MagneticField: [1x1 FEStruct] MagneticFluxDensity: [1x1 FEStruct] Mesh: [1x1 FEMesh] MaxwellStressTensor: [3x3x813 double]
Input Arguments
R
— Electrostatic or magnetostatic solution
ElectrostaticResults
object | MagnetostaticResults
object
Electrostatic or magnetostatic solution, specified as an ElectrostaticResults
or MagnetostaticResults
object. Create R
using the
solve
function.
Version History
Introduced in R2024a
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)