Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
FEM: elmer writer, fix by HoWil
  • Loading branch information
berndhahnebach committed Feb 18, 2020
1 parent e7b7646 commit fc9c8a4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Mod/Fem/femsolver/elmer/writer.py
Expand Up @@ -324,6 +324,7 @@ def _getElectrostaticSolver(self, equation):
# s["Calculate Electric Flux"] = equation.CalculateElectricFlux
s["Calculate Electric Energy"] = equation.CalculateElectricEnergy
s["Calculate Surface Charge"] = equation.CalculateSurfaceCharge
s["Calculate Capacitance Matrix"] = equation.CalculateCapacitanceMatrix

This comment has been minimized.

Copy link
@HoWilgh

HoWilgh Feb 18, 2020

Contributor

Was added accidentally.

s["Displace mesh"] = False
s["Exec Solver"] = "Always"
s["Stabilize"] = equation.Stabilize
Expand Down Expand Up @@ -353,10 +354,11 @@ def _handleElectrostaticBndConditions(self):
for obj in self._getMember("Fem::ConstraintElectrostaticPotential"):
if obj.References:
for name in obj.References[0][1]:
if hasattr(obj, "Potential"):
# https://forum.freecadweb.org/viewtopic.php?f=18&t=41488&start=10#p369454
potential = getFromUi(obj.Potential, "V", "M*L^2/(T^3 * I)")
self._boundary(name, "Potential", potential)
# https://forum.freecadweb.org/viewtopic.php?f=18&t=41488&start=10#p369454 ff
if obj.PotentialEnabled:
if hasattr(obj, 'Potential'):
potential = getFromUi(obj.Potential, "V", "M*L^2/(T^3 * I)")
self._boundary(name, "Potential", potential)
if obj.PotentialConstant:
self._boundary(name, "Potential Constant", True)
self._handled(obj)
Expand Down

0 comments on commit fc9c8a4

Please sign in to comment.