Elmer electrostatics FEM

About the development of the FEM module/workbench.

Moderator: bernd

HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Elmer electrostatics FEM

Post by HoWil »

bernd wrote:
Do you think it can be used for the examples in this shape?
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Elmer electrostatics FEM

Post by bernd »

HoWil wrote: Wed May 27, 2020 7:21 pm
bernd wrote:
Do you think it can be used for the examples in this shape?
lets give it a go. Would you post on GSoC topic. He needs new stuff. I am overloaded with all the bug reports lately and all the follow ups from migration classes and renaming stuff. But it really was worth to finish these both ...
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Elmer electrostatics FEM

Post by HoWil »

The updated model for 'Tutorial 6 - Electrostatics' of the nonGUI examples (https://www.nic.funet.fi/index/elmer/do ... nonGUI.pdf, starting at page 28).
The results from within FC using Elmer do match with the results listed in the documentation/tutorial for Elmer. One has to scale the model (I used Draft-clone) and re-compute the given results from Elmer which are mm-based using e.g. Python-quantities.
Both is documented in the included "Text document - comparison with analytical solution".
Attachments
Tutorial_nonGUI_6 - Electrostatics - StatElecSolve, ElectricForce.FCStd
Simulation model with cleared mesh.
(616.87 KiB) Downloaded 51 times
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Elmer electrostatics FEM

Post by HoWil »

bernd wrote: Sun Mar 15, 2020 10:09 pm
HoWil wrote: Sat Mar 14, 2020 6:05 pm
bernd wrote: Thu Feb 27, 2020 8:18 am You might even need to remember me on this ... one again :oops:
Reminding..... :mrgreen:
Would you have a look at this? But it is not finished yet. The writer does not yet work.
https://github.com/berndhahnebach/FreeC ... rmittivity The idea is to add a object if one would like to change one of these values https://github.com/FreeCAD/FreeCAD/blob ... py#L35-L48 What do you think of this?

bernd
So we still need some new GUI elements to change a constant like the permittivity of vacuum, right?
This is still needed to fully complete this tutorial (https://forum.freecadweb.org/viewtopic. ... 10#p368353) in FC.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Elmer electrostatics FEM

Post by bernd »

HoWil wrote: Sun May 31, 2020 8:19 pm
bernd wrote: Sun Mar 15, 2020 10:09 pm
HoWil wrote: Sat Mar 14, 2020 6:05 pm
bernd wrote: Thu Feb 27, 2020 8:18 am You might even need to remember me on this ... one again :oops:
Reminding..... :mrgreen:
Would you have a look at this? But it is not finished yet. The writer does not yet work.
https://github.com/berndhahnebach/FreeC ... rmittivity The idea is to add a object if one would like to change one of these values https://github.com/FreeCAD/FreeCAD/blob ... py#L35-L48 What do you think of this?

bernd
So we still need some new GUI elements to change a constant like the permittivity of vacuum, right?
This is still needed to fully complete this tutorial (https://forum.freecadweb.org/viewtopic. ... 10#p368353) in FC.
updated the new object to overwrite constants
https://github.com/berndhahnebach/FreeC ... rmittivity The object itself is ready, but elmer writer implementation is not finished. You might have a look at this?
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Elmer electrostatics FEM

Post by bernd »

somehow the file has some problems. Might be due to the regressions we had at the time of creating the file. Mainly the material object. Would you repost the file.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Elmer electrostatics FEM

Post by bernd »

bernd wrote: Thu Jun 04, 2020 11:36 am
somehow the file has some problems. Might be due to the regressions we had at the time of creating the file. Mainly the material object. Would you repost the file.
Would it be possible to post the original sif file and the sif file with the changes our new object should make.
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Elmer electrostatics FEM

Post by HoWil »

bernd wrote: Thu Jun 04, 2020 11:38 am
bernd wrote: Thu Jun 04, 2020 11:36 am
somehow the file has some problems. Might be due to the regressions we had at the time of creating the file. Mainly the material object. Would you repost the file.
Would it be possible to post the original sif file and the sif file with the changes our new object should make.
This is the .sif file I found locally for the model.

Code: Select all

Check Keywords Warn

Header
  Mesh DB "."
End

Solver 1
  Bubbles = Logical False
  Calculate Capacitance Matrix = Logical True
  Calculate Electric Energy = Logical True
  Calculate Electric Field = Logical True
  Calculate Surface Charge = Logical False
  Displace mesh = Logical False
  Equation = String "Stat Elec Solver"
  Exec Solver = String "Always"
  Linear System Abort Not Converged = Logical False
  Linear System Convergence Tolerance = Real 1e-08
  Linear System Iterative Method = String "BiCGStab"
  Linear System Max Iterations = Integer 500
  Linear System Precondition Recompute = Integer 1
  Linear System Preconditioning = String "ILU0"
  Linear System Residual Output = Integer 1
  Linear System Solver = String "Iterative"
  Optimize Bandwidth = Logical True
  Procedure = File "StatElecSolve" "StatElecSolver"
  Stabilize = Logical True
  Steady State Convergence Tolerance = Real 1e-05
  Variable = String "Potential"
  Variable DOFs = Integer 1
End

Simulation 
  BDF Order = Integer 1
  Coordinate Mapping(3) = Integer 1 2 3
  Coordinate System = String "Cartesian 3D"
  Output Intervals = Integer 1
  Simulation Type = String "Steady state"
  Steady State Max Iterations = Integer 1
  Steady State Min Iterations = Integer 0
  Timestepping Method = String "BDF"
  Use Mesh Names = Logical True
End

Constants 
  Permittivity Of Vacuum = Real 8.8542e-21
End

Body 1
  Equation = Integer 1
  Material = Integer 1
  Name = String "Solid1"
End

Material 1
  Relative Permittivity = Real 1.0
End

Equation 1
  Active Solvers(2) = Integer 1 2
End

Solver 2
  Equation = String "ResultOutput"
  Exec Solver = String "After simulation"
  Output File Name = File "case"
  Procedure = File "ResultOutputSolve" "ResultOutputSolver"
  Vtu Format = Logical True
End

Boundary Condition 1
  Electric Infinity BC = Logical True
  Name = String "Face1"
End

Boundary Condition 2
  Capacitance Body = Integer 1
  Name = String "Face2"
End

Boundary Condition 3
  Capacitance Body = Integer 2
  Name = String "Face3"
End
The change has to be made in the 'Constants' section from

Code: Select all

...
Constants 
  Permittivity Of Vacuum = Real 8.8542e-21
End
...
to

Code: Select all

...
Constants 
  Permittivity Of Vacuum = 1 !Real 8.8542e-21
End
...
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Elmer electrostatics FEM

Post by HoWil »

bernd wrote: Thu Jun 04, 2020 11:36 am
somehow the file has some problems. Might be due to the regressions we had at the time of creating the file. Mainly the material object. Would you repost the file.
Any updates on this?
Maybe I missed something :?
If we finish this it can be added to the GSoC examples.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Elmer electrostatics FEM

Post by bernd »

bernd wrote: Thu Jun 04, 2020 11:36 am
somehow the file has some problems. Might be due to the regressions we had at the time of creating the file. Mainly the material object. Would you repost the file.
the FCStd file ...
Post Reply