Elmer electrostatics FEM
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
Re: Elmer electrostatics FEM
Yes, I need for sure some help with point 1.
Re: Elmer electrostatics FEM
Is it possible that you just add my commit "Fix saving values for Infinity and Capacitance BCs" from https://github.com/HoWilgh/FreeCAD/tree ... Cs/src/Mod ??bernd wrote: Hi Bernd
I am a bit in a hurry and do not get the rebaseing to your master branch right.
Re: Elmer electrostatics FEM
Hi Ted,
in 0.19 you now find modified boundary conditions allowing for setting ininity-BC and the calculation of capacitance matrix. The user interface is rather simple and for sure needs some additional automated checks but all the necessary things are there. The only thing left to do is to change the "Vacuum Permittivity = 1.0". This was not implemented yet and I do not know if it is really necessary to change something like the permittivity of vacuum often.
Please see:
Re: Elmer electrostatics FEM
what would be needed to do this by the elmer writer? I would like to add this example to official FreeCAD FEM examples as it is a know example (elmer) and it would be the first example in electic FEM. Since we use python to run the analysis I would not like to change the elmer input file after the writing process has finished. All should happen in elmer writer.
cheers bernd
Re: Elmer electrostatics FEM
I think it is not much. I tried to modify it myself but finally (after giving up ) decided that setting the 'Permittivity of Vacuum' to 1 is a really really special case and only used for this tutorial.
I added in 'electrostatic.py' (see https://github.com/FreeCAD/FreeCAD/blob ... ostatic.py)
Code: Select all
obj.addProperty(
"App::PropertyFloat", "PermittivityOfVacuum",
"Electrostatic", "PermittivityOfVacuum")
Code: Select all
def _handleElectrostaticConstants(self):
self._constant(
"Permittivity Of Vacuum",
getConstant("PermittivityOfVacuum", "T^4*I^2/(L*M)"))
This is also my goal. But we should add some additional improvements before:
- The UI for 'ConstraintElectrostaticPotential' should be made a bit more intuitive. I struggled enabling/disabling the capacitanceBody_spinBox depending on capacitanceBodyBox (see the screenshot below and https://github.com/FreeCAD/FreeCAD/blob ... tential.ui) BTW: the spinbox and the capacitanceBodyBox could be oriented as for 'Potential'.
- A check if the flag in the boundary condition is set when capacitance matrix is selected in es equation would be good... should be done in writer.py
- Attachments
-
- ConstraintElectrostaticPotential.png (102.96 KiB) Viewed 1594 times
Re: Elmer electrostatics FEM
some patience I moved constants to an own module see git commit dbbab7ae and git commit 3d4013bf Next will be some small new object to be able to overwrite constants for the analysis the object is in. IMHO this is the way to go and not add the constants to the equation object.
Re: Elmer electrostatics FEM
for the ui stuff I did not had the time to have a look at this. This will take a few days ... First the constants and the example. You might even need to remember me on this ... one again