[FEM] potential constraint: change default value

- in practice one wants to apply potentials to faces via this constraint, therefore enable to set a potential by default, also assure that the initial unit is V
This commit is contained in:
Uwe
2022-08-15 02:41:35 +02:00
parent 1cd02ffee8
commit 32d74bb0ca

View File

@@ -52,7 +52,9 @@ class ConstraintElectrostaticPotential(base_fempythonobject.BaseFemPythonObject)
"Parameter",
"Electric Potential"
)
obj.Potential = 0.0
# setting 1 V assures that the unit does not switch to mV
# and the constraint holds usually Volts
obj.Potential = "1 V"
if not hasattr(obj, "PotentialEnabled"):
obj.addProperty(
@@ -61,7 +63,7 @@ class ConstraintElectrostaticPotential(base_fempythonobject.BaseFemPythonObject)
"Parameter",
"Potential Enabled"
)
obj.PotentialEnabled = False
obj.PotentialEnabled = True
if not hasattr(obj, "PotentialConstant"):
obj.addProperty(