FEM Example Capacitance Two Balls/de

From FreeCAD Documentation
Jump to navigation Jump to search
This page is a translated version of the page FEM Example Capacitance Two Balls and the translation is 36% complete.
Other languages:
Deutsch • ‎English • ‎français • ‎italiano • ‎polski • ‎русский
Freecad.svg Tutorial
Topic
Finite Element Analysis
Level
Beginner
Time to complete
30 min
Authors
Sudhanshu Dubey
FreeCAD version
0.19 or above
Example files
Created programmatically
See also
None

Einleitung

This example is meant to show how to simulate the 6th example of Elmer GUI Tutorials, Electrostatic equation – Capacitance of two balls, using the new FEM Examples. It illustrates how to setup the example, study it's various parts, solve it using the Elmer Solver and visualize the results using Clip Filter.

Two balls result 2.png

The final result of this tutorial

Voraussetzungen

  • A compatible version of FreeCAD designated in the tutorial overview.
    Use the Help → About FreeCAD to see the version of FreeCAD installed
  • No external software is needed for loading the example, viewing the mesh and geometry as well as for visualizing the results.
  • For solving the finite element analysis (FEA), the solver software Elmer must be installed on your computer. See this page for how to install Elmer.

Das Beispiel vorbereiten

Arbeitsbereich FEM laden

  • FreeCAD starten, Der Arbeitsbereich Start sollte geladen werden.
  • Zum Arbeitsbereich Workbench FEM.svg FEM wechseln.

Das Beispiel laden

  • Go to Utilities → FEM Examples.svg Open FEM examples.
  • When the GUI opens, find and open "Electrostatics Capacitance Two Balls". You can easily find the example in All or in Solvers → Elmer. For opening the example, either double click on it or select it and click Setup.

Two balls selection.png

Den Simulationsfall verstehen

This case presents the solution of the capacitance of perfectly conducting balls in free space. A voltage difference between the balls results to electric charge being introduced to the system. The balls have also self-capacitance that comes from the voltage difference with the far field. Therefore a symmetric capacitance matrix with of size 2 × 2 needs to be solved. The capacitances may be computed from two different voltage configurations.

Das Modell verstehen

  • The model contains three spheres.
  1. The two smaller ones are the perfectly conducting balls.
  2. The bigger one is to simulate the surrounding air.
  • The two smaller spheres are fused together and then that fusion is is cut from the bigger sphere.

Two balls model full.png

The initial model

Der Analyse-Container und seine Objekte

The objects used in this electrostatic analysis:

  1. FEM Analysis.svg Analysis container
  2. FEM SolverElmer.svg SolverElmer
  3. FEM EquationElectrostatic.svg Electrostatic, the electrostatics equation
  4. FEM MaterialFluid.svg FemMaterial, a fluid material to represent the surrounding air
  5. FEM ConstraintElectrostaticPotential.svg ElectrostaticPotential, constraints (3 of them)
  6. Fem-thermomechanical-analysis.svg ConstantVaccumPermittivity, optional
  7. FEM MeshGmshFromShape.svg Mesh, a Gmsh mesh
  8. FEM MeshRegion.svg MeshRegion, a mesh region for the smaller spheres

Two balls analysis.png

The objects as they appear in the Tree view

Die FEA durchführen

  • In Tree view double click on the solver object FEM SolverElmer.svg.
  • Click on Write file in the same task panel. Watch the log window until it prints "write completed." You can ignore the warning about the vacuum permittivity that might appear.
  • Click on Run. Since this is a small analysis it should take a few seconds to run so wait till you see "ELMER SOLVER FINISHED AT" in the output.
  • Click on Close in the task panel after the run is finished.
  • Two new result objects should be created in the tree view, FEM PostPipelineFromResult.svg SolverElmerResult and TextDocument.svg SolverElmerOutput.

If you get an error message on solver binary or similar when triggering the analysis, check the installation of Elmer.

Ergebnisse darstellen

  • Make sure the mesh is invisible. If not, select the FEM MeshGmshFromShape.svg Mesh object and press Space to toggle the visibility.
  • Also make sure the Cut object is invisible.
  • Double click on the FEM PostPipelineFromResult.svg SolverElmerResult object to ope its task dialog.
  • Change the "Field" to "potential" and press OK.
  • You will notice that the color of the sphere has changed to blue and that the gradient on the right is showing values from 0 to 1. It should look something like this:

Two balls potential.png

Die Ergebnisse nachbearbeiten

  • While we have successfully visualised the potential result, currently we are only seeing the zero potential in the air surrounding the two balls. To view the potential on the balls we need to apply a clip filter.
  • In the tree view select the FEM PostPipelineFromResult.svg SolverElmerResult object and then from the tool bar click on the button FEM PostFilterClipRegion.svg Region Clip Filter.
  • This will open a dialog with the filter configurations. Click there on the button List-add.svg Create and choose Fem-post-geo-plane.svg Plane. This adds a plane through the center of the sphere at which the result mesh is cut. To smooth the cut face, check the option Cut Cells. Eventually click Apply.

Two balls postcreate.png

  • In the tree view there is a new entry called Functions. It contains the created Fem-post-geo-plane.svg Plane. Make it invisible using Space.
  • Double-click on the FEM PostFilterClipRegion.svg Clip object in the tree view.
  • Change the "Field" to "potential" and press OK.
  • Toggle the visibility of the FEM PostPipelineFromResult.svg SolverElmerResult object using Space and you should see something like this:

Two balls result.png

Now we can clearly see that potential distribution in and around the balls.

Note that when FEM PostApplyChanges.svg Apply Changes is on, you would have been able to select the "Field" in the clip dialog directly and not to reopen it after the plane was created.

Finding the Capacitance

  • Our actual focus is to find the capacitance which is contained in the TextDocument.svg SolverElmerOutput.
  • Double click on TextDocument.svg SolverElmerOutput to open it. Scroll down till you find:
StatElecSolve: Capacitance matrix computation performed (i,j,C_ij)
StatElecSolve:   1  1    5.07016E+00
StatElecSolve:   1  2    1.69328E+00
StatElecSolve:   2  2    5.07201E+00
  • Here, our desired result is C12 = 1.69328. This value is close to the 1.691 given in the Elmer GUI Tutorials. We can get an even closer value by making a finer Mesh Region but this activity is left for the user. Also, the user is advised to play with the Clip Filter to get a visual result similar to the first picture of this tutorial.