[FEM] Elmer: more work on Stabilize

- it turned out that despite not mentioned in the manual, ElmerGUI adds the Stabilize setting for all setups
-> bring "Stabilize" back for all equations
(for "Bubbles" it is correct that this is an equation-specific setting)
This commit is contained in:
Uwe
2022-08-04 03:57:46 +02:00
parent bf09d0679d
commit 34e45fbcac
4 changed files with 15 additions and 16 deletions

View File

@@ -45,14 +45,6 @@ class Proxy(nonlinear.Proxy, equationbase.FlowProxy):
def __init__(self, obj):
super(Proxy, self).__init__(obj)
obj.addProperty(
"App::PropertyBool",
"Stabilize",
"Flow",
""
)
obj.Stabilize = True
obj.Priority = 10

View File

@@ -46,13 +46,7 @@ class Proxy(nonlinear.Proxy, equationbase.HeatProxy):
super(Proxy, self).__init__(obj)
# according to the Elmer models manual Bubbles is by default True
# Stabilize is False
obj.addProperty(
"App::PropertyBool",
"Stabilize",
"Heat",
""
)
# and Stabilize is False (Stabilize is added in linear.py)
obj.addProperty(
"App::PropertyBool",
"Bubbles",
@@ -60,6 +54,7 @@ class Proxy(nonlinear.Proxy, equationbase.HeatProxy):
""
)
obj.Bubbles = True
obj.Stabilize = False
obj.Priority = 20

View File

@@ -127,6 +127,14 @@ class Proxy(equation.Proxy):
# same as with LinearTolerance
obj.setExpression('SteadyStateTolerance', "1e-5")
obj.addProperty(
"App::PropertyBool",
"Stabilize",
"Base",
""
)
obj.Stabilize = True
class ViewProxy(equation.ViewProxy):
pass

View File

@@ -354,8 +354,8 @@ class Writer(object):
s["Procedure"] = sifio.FileAttr("HeatSolve/HeatSolver")
s["Variable"] = self._getUniqueVarName("Temperature")
s["Exec Solver"] = "Always"
s["Stabilize"] = equation.Stabilize
s["Bubbles"] = equation.Bubbles
s["Stabilize"] = equation.Stabilize
s["Optimize Bandwidth"] = True
return s
@@ -475,6 +475,7 @@ class Writer(object):
s["Displace mesh"] = False
s["Exec Solver"] = "Always"
s["Optimize Bandwidth"] = True
s["Stabilize"] = equation.Stabilize
return s
def _handleElectrostaticConstants(self):
@@ -543,6 +544,7 @@ class Writer(object):
s["Calculate Grad Abs"] = equation.CalculateGradAbs
s["Calculate Grad Magnitude"] = equation.CalculateGradMagnitude
s["Enforce Positive Magnitude"] = equation.EnforcePositiveMagnitude
s["Stabilize"] = equation.Stabilize
return s
def _handleElectricforce(self):
@@ -561,6 +563,7 @@ class Writer(object):
s = self._createEmptySolver(equation)
s["Equation"] = "Electric Force" # equation.Name
s["Procedure"] = sifio.FileAttr("ElectricForce/StatElecForce")
s["Stabilize"] = equation.Stabilize
return s
def _handleElasticity(self):
@@ -596,6 +599,7 @@ class Writer(object):
s["Displace mesh"] = False
s["Exec Solver"] = "Always"
s["Optimize Bandwidth"] = True
s["Stabilize"] = equation.Stabilize
return s
def _handleElasticityConstants(self):