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
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: [1276×1 double]
ElectricField: [1×1 FEStruct]
ElectricFluxDensity: [1×1 FEStruct]
Mesh: [1×1 FEMesh]
Generate the Maxwell stress tensor.
R = generateMaxwellStressTensor(R)
R =
ElectrostaticResults with properties:
ElectricPotential: [1276×1 double]
ElectricField: [1×1 FEStruct]
ElectricFluxDensity: [1×1 FEStruct]
Mesh: [1×1 FEMesh]
MaxwellStressTensor: [2×2×1276 double]
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: [1×1 FEStruct]
MagneticField: [1×1 FEStruct]
MagneticFluxDensity: [1×1 FEStruct]
Mesh: [1×1 FEMesh]
Generate the Maxwell stress tensor.
R = generateMaxwellStressTensor(R)
R =
MagnetostaticResults with properties:
MagneticPotential: [1×1 FEStruct]
MagneticField: [1×1 FEStruct]
MagneticFluxDensity: [1×1 FEStruct]
Mesh: [1×1 FEMesh]
MaxwellStressTensor: [3×3×813 double]
Input Arguments
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.
Website auswählen
Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .
Sie können auch eine Website aus der folgenden Liste auswählen:
So erhalten Sie die bestmögliche Leistung auf der Website
Wählen Sie für die bestmögliche Website-Leistung die Website für China (auf Chinesisch oder Englisch). Andere landesspezifische Websites von MathWorks sind für Besuche von Ihrem Standort aus nicht optimiert.
Amerika
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- 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)