difference between tutorial FreeCad / Elmer

About the development of the FEM module/workbench.

Moderator: bernd

Post Reply
User avatar
lidiriel
Posts: 37
Joined: Sat Dec 21, 2019 9:30 pm
Location: France

difference between tutorial FreeCad / Elmer

Post by lidiriel »

Hi all,

i continue to testing FreeCAD FEM with ELmer.
I had trying Electrostatic equation – Capacitance of perforated plate calculation.

In ElmerGUI i retrieved the capacitance result of ~216 fF (2.1636998485501316E-013)
but in FreeCAD FEM tutorial for this identical use case i obtain : 2.1650117323981551E-010
Perhaps is it a problem of unity ? What is the best choice for the unity system in freecad ?
If this choice has no impact, what is the possible problem ?

ElmerGUI (standalone) output :

Code: Select all

StatElecSolver: -------------------------------------
StatElecSolver: Electrostatics solver:
StatElecSolver: -------------------------------------
StatElecSolver: Electrostatic iteration: 1
StatElecSolver:  Assembly (s)          :  0.33295299999999994
      10 0.3391E-02
      20 0.9472E-04
      30 0.7795E-07
      37 0.4059E-10
ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.88460910      2.0000000     ) :: electrostatics
StatElecSolver:  Solve (s)             :  0.22230700000000003
StatElecSolver:  Tot. Electric Energy  :   1.0818499242750658E-013
StatElecSolver:  Capacitance           :   2.1636998485501316E-013
StatElecSolver:  Result Norm   :   0.88460909986281633
StatElecSolver:  Relative Change :    2.0000000000000000
StatElecSolver: Electrostatic iteration: 2
StatElecSolver:  Assembly (s)          :  0.29112699999999991
       1 0.2896E-10
ComputeChange: NS (ITER=2) (NRM,RELC): ( 0.88460910     0.27968334E-09 ) :: electrostatics
StatElecSolver:  Solve (s)             :   1.9309999999999938E-002
StatElecSolver:  Tot. Electric Energy  :   1.0818499242750922E-013
StatElecSolver:  Capacitance           :   2.1636998485501843E-013
StatElecSolver:  Result Norm   :   0.88460909961540590
StatElecSolver:  Relative Change :    2.7968333759297845E-010
ComputeChange: SS (ITER=1) (NRM,RELC): ( 0.88460910      2.0000000     ) :: electrostatics
FreeCAD FEM/Elmer output :

Code: Select all

ComputeNorm: Computing norm of solution
ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.93286628      2.0000000     ) :: stat elec solver
StatElecSolver:  Solve (s)             :   5.5589000000000333E-002
StatElecSolver:  Tot. Electric Energy  :   1.0825058661990775E-010
StatElecSolver:  Potential difference:    1.0000000000000000
StatElecSolver:  Capacitance           :   2.1650117323981551E-010
StatElecSolver:  Result Norm   :   0.93286628081974932
StatElecSolver:  Relative Change :    2.0000000000000000
DefaultFinish: Finished solver: stat elec solver
ComputeNorm: Computing norm of solution
ComputeChange: SS (ITER=1) (NRM,RELC): ( 0.93286628      2.0000000     ) :: stat elec solver
SingleSolver: Attempting to call solver: 2
SingleSolver: Solver Equation string is: electric force
StatElecForce: Computing electric force on boundaries
StatElecForce:
StatElecForce: Net electric force  :   -1.025385E-12  -1.071612E-12  -1.030866E-10
StatElecForce: Resultant force  :    1.030973E-10
SingleSolver: Attempting to call solver: 3
Note i use :

Code: Select all

OS: Debian GNU/Linux 11 (bullseye) (X-Cinnamon/lightdm-xsession)
Word size of FreeCAD: 64-bit
Version: 0.20.2.29603 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 0.20.2)
Hash: 930dd9a76203a3260b1e6256c70c1c3cad8c5cb8
Python 3.10.8, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: French/France (fr_FR)
Installed mods: 
  * fasteners 0.4.52
  * ThreadProfile 1.84.0
and Elmer Version: 9.0 (Rev: 40e221719)
RichB2k
Posts: 9
Joined: Thu Sep 08, 2022 8:50 pm

Re: difference between tutorial FreeCad / Elmer

Post by RichB2k »

Hello,

Since the capacitance matches to the third digit, except for a 10^3 factor, it most likely is a units issue. When in Elmergui, open 'Model', 'Summary', and check the size of the bounding box. When you ran the Elmergui solution, did you add coordinate scaling = 0.001?

Maybe posting the entire solver log output from Elmer would be helpful.

Thanks, Rich.
david69
Veteran
Posts: 1774
Joined: Wed Jan 01, 2014 7:48 pm

Re: difference between tutorial FreeCad / Elmer

Post by david69 »

salut,

check here https://wiki.freecad.org/FEM_SolverElmer#Notes
there is a note about units.
Post Reply