FEM: elmer writer, fix by HoWil

This commit is contained in:
Bernd Hahnebach
2020-02-18 05:19:38 +01:00
parent e7b7646157
commit fc9c8a4fee

View File

@@ -324,6 +324,7 @@ class Writer(object):
# s["Calculate Electric Flux"] = equation.CalculateElectricFlux
s["Calculate Electric Energy"] = equation.CalculateElectricEnergy
s["Calculate Surface Charge"] = equation.CalculateSurfaceCharge
s["Calculate Capacitance Matrix"] = equation.CalculateCapacitanceMatrix
s["Displace mesh"] = False
s["Exec Solver"] = "Always"
s["Stabilize"] = equation.Stabilize
@@ -353,10 +354,11 @@ class Writer(object):
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)