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.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- 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)