# FEM: Esempio di capacità di due palline

Tutorial |

Argomento |
---|

Analisi agli elementi finiti |

Livello di difficoltà |

Base |

Tempo di esecuzione |

Autores |

Sudhanshu Dubey |

Versione di FreeCAD |

0.19 o superiore |

Files di esempio |

## Introduzione

Questo esempio ha lo scopo di mostrare come simulare il sesto esempio di Elmer GUI Tutorials, **Equazione elettrostatica - Capacità di due palline **, utilizzando i nuovi Esempi di FEM. Illustra come impostare l'esempio, studiarne le varie parti, risolverlo usando il solver Elmer e visualizzare i risultati usando Clip Filter.

## Requirements

- A compatible version of FreeCAD designated in the tutorial overview.
- Use the
**Help → About FreeCAD**to see the version of FreeCAD installed

- Use the
- No external software is needed for loading the example, viewing the mesh and geometry as well as for visualizing the results.
- For solving the FEA, the solver software Elmer must be installed on your computer. See Elmer Solver for how to install Elmer.

## Set up the example

### Load FEM Workbench

- Start FreeCAD, the Start Workbench should be loaded
- Switch to FEM workbench.

### Load the example

- Go to
**Utilities → 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.

## Understanding the Simulation Case

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.

## Understanding the Model

- The model contains three spheres.

- The two smaller ones are the perfectly conducting balls.
- 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.

## Analysis container and its objects

- Elmer solver
- Electrostatic equation
- a fluid material (to represent the surrounding air)
- electrostatic constraint (3 of them)
- Constant Vaccum Permittivity
- a Gmsh FEM mesh
- Mesh region (for the smaller spheres)

## Running the FEA

- In Tree view double click on the solver object .
- Click on Write file in the same task window. Watch the log window until it prints "write completed."
- 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 window after the run is finished.
- Two new result objects should be created, SolverElmerResult and SolverElmerOutput.
- If you get an error message on solver binary or similar when triggering the analysis check installation of Elmer Solver.

## Visualizing Results

- Be sure the analysis is activated.
- Be sure the analysis still contains the result object, if not just re-run the solver.
- Make sure the mesh is invisible. If not, select the mesh object press Space to toggle the visibility.
- Double click on the SolverElmerResult to load in the task panel.
- Change the "Mode" to "Surface" and the "Field" to "potential". Press Ok.
- You will notice that the colour 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:

## Post Processing the Result

- 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 SolverElmerResult and then from the tool bar click on the Post Create Clip Filter.
- This will open the task panel with the clip filter configurations. Select "Plane" in the "Create" menu and check the "Cut Cells" box. After that click Apply.

- Then choose the same configurations (Surface and potential) as you have while visualising the results. Click Ok. Toggle the visibility of SolverElmerResult using Space and you should see something like this:

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

## Finding the Capacitance

- Our actual focus is to find the capacitance which is contained in the SolverElmerOutput.
- Double click on SolverElmerOutput to open it. Scroll down till you find:

StatElecSolve: Capacitance matrix computation performed (i,j,C_ij) StatElecSolve: 1 1 5.08013E+00 StatElecSolve: 1 2 1.70071E+00 StatElecSolve: 2 2 5.07960E+00

- Here, our desired result is
`C`

. This value is close to the_{12}= 1.70071`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.

- General: Tutorial, Video tutorial

**Sketcher:**Sketcher reference, Basic Sketcher tutorial**PartDesign:**Simple object, Simple object 2**Part:**Engraved text, Wiffle ball, Basic modeling, Screw threads, Placement**TechDraw:**Basic TechDraw tutorial, New template

**Path:**Path for the impatient**FEM:**Cantilever analysis, Shear in a composite block, Postprocessing with Paraview, Reinforced concrete**Rendering:**Raytracing tutorial, POV-ray, Blender

**Materials:**Solid, Fluid, Nonlinear mechanical; Material editor

**Element geometry:**Beam (1D), Beam rotation (1D), Shell (2D), Fluid flow (1D)

**Constraints**

**Electrostatic:**Potential

**Fluid:**Initial velocity, Fluid boundary, Flow velocity

**Mechanical:**Fixed, Displacement, Plane rotation, Contact, Transform, Force, Pressure, Self weight, Bearing, Gear, Pulley

**Thermal:**Initial temperature, Heat flux, Temperature, Heat source

**Solve:**Calculix tools, CalculiX, Elmer, Z88;**Equations:**Heat, Elasticity, Electrostatic, Fluxsolver, Flow;**Solver:**Solver control, Solver run

**Results:**Purge, Show;**Postprocessing:**Apply changes, Pipeline from result, Create warp vector filter, Create scalar clip filter, Create cut filter, Create clip filter, Create data along line filter, Create linearized stresses,

Create data at point filter, Create functions

**Utilities:**Clipping plane, Remove clipping planes; Mesh clear, Mesh print info

**Additional:**Preferences; FEM Install, FEM Mesh, FEM Solver, FEM CalculiX, FEM Project, FEM Concrete; FEM Element Types

**Installazione:**Windows, Linux, Mac;**Getting started****Base:**About FreeCAD, Workbenches, Preferences, Document structure, Interface Customization, Properties, Mouse Model; Tutorials**Ambienti**: Menu di base; Arch, Draft, FEM, Image, Inspection, Mesh, OpenSCAD, Part, PartDesign, Path, Plot, Points, Raytracing, Reverse Engineering, Robot, Ship, Sketcher, Spreadsheet, Start, Surface workbench, TechDraw, Test Framework, Web

**Scripting:**Introduction to Python, FreeCAD scripting tutorial, FreeCAD Scripting Basics, How to install macros, Gui Command, Units**Modules:**Builtin modules, Workbench creation, Installing more workbenches**Meshes:**Mesh Scripting, Mesh Module**Parts:**The Part Module, Topological data scripting, PythonOCC, Mesh to Part**Coin scenegraph:**The Coin/Inventor scenegraph, Pivy**Qt interface:**PySide, Using the FreeCAD GUI, Dialog creation**Parametric objects:**Scripted objects**Other:**Code snippets, Line drawing function, Embedding FreeCAD, FreeCAD vector math library, Power users hub, Python, Macros, FreeCAD Scripting Basics, Topological data scripting