[FEM] Elmer: fix solver stabilize settings
- according to https://www.nic.funet.fi/index/elmer/doc/ElmerModelsManual.pdf the stabilization methods are equation-specific and only available for some solvers This commits changes these settings according to the manual
This commit is contained in:
@@ -44,6 +44,15 @@ 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
|
||||
|
||||
|
||||
|
||||
@@ -44,6 +44,23 @@ class Proxy(nonlinear.Proxy, equationbase.HeatProxy):
|
||||
|
||||
def __init__(self, obj):
|
||||
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",
|
||||
""
|
||||
)
|
||||
obj.addProperty(
|
||||
"App::PropertyBool",
|
||||
"Bubbles",
|
||||
"Heat",
|
||||
""
|
||||
)
|
||||
obj.Bubbles = True
|
||||
|
||||
obj.Priority = 20
|
||||
|
||||
|
||||
|
||||
@@ -126,20 +126,6 @@ class Proxy(equation.Proxy):
|
||||
)
|
||||
# same as with LinearTolerance
|
||||
obj.setExpression('SteadyStateTolerance', "1e-5")
|
||||
obj.addProperty(
|
||||
"App::PropertyBool",
|
||||
"Stabilize",
|
||||
"Base",
|
||||
""
|
||||
)
|
||||
obj.Stabilize = True
|
||||
obj.addProperty(
|
||||
"App::PropertyBool",
|
||||
"Bubbles",
|
||||
"Base",
|
||||
""
|
||||
)
|
||||
obj.Bubbles = False
|
||||
|
||||
|
||||
class ViewProxy(equation.ViewProxy):
|
||||
|
||||
@@ -474,8 +474,6 @@ class Writer(object):
|
||||
s["Calculate Capacitance Matrix"] = equation.CalculateCapacitanceMatrix
|
||||
s["Displace mesh"] = False
|
||||
s["Exec Solver"] = "Always"
|
||||
s["Stabilize"] = equation.Stabilize
|
||||
s["Bubbles"] = equation.Bubbles
|
||||
s["Optimize Bandwidth"] = True
|
||||
return s
|
||||
|
||||
@@ -585,7 +583,7 @@ class Writer(object):
|
||||
|
||||
def _getElasticitySolver(self, equation):
|
||||
s = self._createLinearSolver(equation)
|
||||
s["Equation"] = equation.Name
|
||||
s["Equation"] = "Stress Solver" # equation.Name
|
||||
s["Procedure"] = sifio.FileAttr("StressSolve/StressSolver")
|
||||
s["Variable"] = self._getUniqueVarName("Displacement")
|
||||
s["Variable DOFs"] = 3
|
||||
@@ -597,8 +595,6 @@ class Writer(object):
|
||||
s["Calculate Pangle"] = equation.CalculatePangle
|
||||
s["Displace mesh"] = False
|
||||
s["Exec Solver"] = "Always"
|
||||
s["Stabilize"] = equation.Stabilize
|
||||
s["Bubbles"] = equation.Bubbles
|
||||
s["Optimize Bandwidth"] = True
|
||||
return s
|
||||
|
||||
@@ -771,11 +767,9 @@ class Writer(object):
|
||||
def _getFlowSolver(self, equation):
|
||||
s = self._createNonlinearSolver(equation)
|
||||
s["Equation"] = "Navier-Stokes"
|
||||
# s["Equation"] = equation.Name
|
||||
s["Procedure"] = sifio.FileAttr("FlowSolve/FlowSolver")
|
||||
s["Exec Solver"] = "Always"
|
||||
s["Stabilize"] = equation.Stabilize
|
||||
s["Bubbles"] = equation.Bubbles
|
||||
s["Optimize Bandwidth"] = True
|
||||
return s
|
||||
|
||||
|
||||
Reference in New Issue
Block a user